Odoo Access Rights and Record Rules: Common Mistakes — Odoo & ERP article by Rui Codex

Odoo access rights grant create, read, write and delete permissions per model and group, while record rules filter individual records a user sees. Common mistakes include broad groups granted to end a support ticket, misread rule logic, domains on unreadable fields, and testing only as an administrator. Testing each role with a user account catches most of them.

Key takeaways

  • Access rights control which operations a group may perform on a model, while record rules control which individual records appear.
  • Record rules from different groups combine with OR, and global record rules combine with AND, so each added group can widen what a user sees.
  • Adding a user to a broad group to fix one error usually exposes far more data than the original need.
  • Testing every role with a real non-administrator account is the most reliable way to catch these problems before go-live.

How do Odoo access rights and record rules differ?

Access rights decide whether a group may read, create, write or delete records of a model at all. Record rules decide which of those records the user actually sees. Both layers apply at the same time, so a problem in either one can make a feature look broken.

In Odoo, access rights are defined per model and per group, usually in the security access file of a module. Record rules are domain filters, for example limiting a sales user to the records where they are the salesperson. The vendor's own documentation describes how these security layers are configured: Odoo Documentation.

The two layers are complementary rather than interchangeable. A user with read access to a model still sees nothing if a record rule excludes every record. A permissive record rule does nothing for a user who lacks the underlying access right, because the rule cannot open a door the access right keeps closed.

Tip: When a user reports missing data, first check whether the model is inaccessible or whether the records are filtered out. The two symptoms look similar on screen but have different fixes.

Why does granting a broad group cause problems?

Adding a user to a wide group is the fastest way to clear a permission error, and it is the mistake that spreads most quietly. The error disappears, the ticket closes, and nobody reviews what the group now unlocks.

A typical pattern is a support request that a user cannot open a report. The quick fix is to add them to an internal management group. That group may carry access rights on models far beyond the user's job, including pricing, payroll-adjacent data or settings they should never change.

The trade-off is simple. Narrow groups are precise but need maintenance when roles change. Broad groups are easy to assign but create access that nobody designed. Neither option is wrong in every case, but the broad option should be a deliberate, documented decision rather than a reflex.

Tip: Before adding a user to any group, list the menus and models that group unlocks. If the list is longer than the task, look for a narrower option.
  • Identify the exact model and operation the user is blocked on.
  • Check which existing groups already grant that operation.
  • Prefer a custom group that matches the real business role.
  • Record who approved the change and why.

How do record rule domains go wrong?

Record rule domains usually fail for one of three reasons: the logic is inverted, the scope is wider than intended, or two rules combine in a way the author did not expect. Each failure is silent, which is why it tends to surface only after users complain.

Global and group rules combine differently

Odoo's documentation explains that global record rules are combined with AND, while rules attached to groups are combined with OR. A user who belongs to two groups therefore gets the union of their group rules, and that union must also satisfy every global rule. The vendor describes these security mechanics in Odoo Documentation.

This has a practical consequence. A second group that looks harmless can widen what a user sees. A group rule with an empty or very broad domain effectively grants everyone in that group unrestricted access to the model, regardless of how carefully the other rules were written.

Domains that depend on the current user

Many domains reference the current user, the active company or the user's assigned team. Mistakes appear when a comparison runs against a field that is empty for some records, so those records quietly drop out of the list. Multi-company setups add another risk: a rule that forgets the active company can show records from a company the user should not see.

Tip: Test every domain with records where the referenced fields are empty, and with a user who belongs to more than one company if your setup uses several.

A rule that follows a relation to another model can hide records when the user lacks access to that related model. The result looks like missing data rather than a permission error, which makes the cause hard to find.

Consider a rule that filters opportunities by a region stored on the customer. If the user cannot read the customer's region information, the filter behaves in a way the author did not design for. Support reports then describe records as vanished, and the team searches the wrong layer for the cause.

The fix is to design access for the related models at the same time as the main model, and to test with a user holding the exact role. The trade-off is more rules and more groups to maintain, which is acceptable when the alternative is data that disappears for reasons nobody can explain.

LayerWhat it controlsTypical failureWho should maintain it
Access rightsWhich operations a group may perform on a modelBroad groups granted to clear one errorBusiness owner with IT review
Global record rulesA restriction applied to everyoneAccidentally excluding legitimate usersAdministrator with documented intent
Group record rulesExtra visibility granted to group membersAn additional group widening access silentlyModule owner and business owner together

How should you test access before go-live?

Test each role with a real non-administrator account, using records the role should see and records it should not. Administrator accounts see more than regular roles, so a test run as administrator shows little about what a sales or warehouse user will actually see.

A reliable test separates the four operations. A user may be able to read a record but not edit it, or create a record but not delete it. Each operation should be checked on its own, because a single successful screen does not prove the others.

  • Create one test user per business role.
  • List the records each role must see and the records it must not see.
  • Test create, read, write and delete separately for each model.
  • Repeat the full test after every group or rule change.
  • Review the group memberships of anyone who changed roles recently.

Teams that want these rules designed into a wider system can look at our Odoo and ERP service page or the work described on our ERP and CRM integration page. Related articles are grouped on the Odoo and ERP guides index.

Hypothetical examples of access mistakes

Here are two hypothetical scenarios:

Scenario one: a broad group used as a quick fix

Prefer a delivered project to a scenario? Read the case study: Netsis B2B Sales Platform.

A warehouse user cannot open a purchasing report, so an administrator adds them to a manager group. Later, the same user can see supplier pricing that their role never required. The narrower fix would have been a custom reporting group with read access to that single report.

Scenario two: a rule that hides new records

A sales team member reports that some new customer contacts never appear in their list. The record rule filters by a field that is empty until a contact is fully set up, so incomplete contacts fall outside the domain. Adding a check for empty values and testing with a freshly created contact resolves the problem.

Frequently Asked Questions

What is the difference between an Odoo access right and a record rule?

An access right decides whether a group can perform an operation on a model at all. A record rule filters which individual records that group can see within the model. A user needs both to work with a record, so a problem in either layer can look like a missing feature or missing data.

Why can a user see fewer records than expected?

The most common cause is a record rule whose domain excludes records through an empty field, a wrong company check or a relation to a model the user cannot read. Start by testing the same user against a known record. Then compare the domain with the record's actual field values to find the excluded case.

Is it safe to add a user to a manager group to fix a permission error?

It is usually not safe as a default. A manager group often unlocks models and menus well beyond the user's task, so the permission error disappears while unrelated access appears. A narrower custom group, reviewed by the business owner, solves the same problem with a clear record of what was granted.

How often should Odoo access rights be reviewed?

Review access whenever a role changes, a new module is installed, or a group or record rule is edited. Many teams also run a scheduled review of group memberships. The goal is to confirm that each person still has only the access their current work requires.

Sources

Tags: Odoo Access Rights Record Rules ERP Security User Groups Odoo Configuration Permissions Testing

Need Help Implementing This?

Our team can help you put these insights into practice. From AI automation to custom software development, we build solutions that deliver real results.

Send a project request