The real test of permission migration: Is denial still denying?

On November 5, 2026, Kevin Riedl of the Swiss software quality team Wavect published an Odoo 20 permission migration acceptance note. The shortest and most memorable sentence in the entire document is this: neither the users nor the records changed, yet a simple and crude permission rewrite turned “deny” into “allow.” The business policy did not change; what changed was the way authorization combinations were made.

This sentence appears at a delicate point in time. Odoo 20 was officially released in September 2026, and a large number of enterprises are doing test upgrades from 19 to 20; according to the official statement, the upgrade platform is expected to open at the end of November. And permissions are precisely the hurdle most easily glossed over by 'installation succeeded' and 'the administrator can open the page'—because when there is a permissions problem, the interface usually looks completely normal.

1. The two mechanisms are merged into one, and the determination formula has changed

Odoo 19's security model is two-stage: first, model-level ACLs determine "whether this identity can perform this operation on this model," and then record rules are applied to filter these operations down to specific rows. These two layers are cumulative; the second layer is responsible for narrowing.

Odoo 20 puts operations and record domains into the same access model. According to the official 20.0 security reference, ir.access defines permissions by group, operation, and domain: entries with groups grant access, while entries without groups restrict access. This means the old division of labor—broad ACLs as a fallback and narrow rules as the final gate—no longer holds; the decision becomes a single expression that must hold simultaneously:

At least one group authorization is matched, and every applicable global restriction is satisfied.

A restriction alone does not grant access; an additional group authorization will directly expand the scope of readable records.

版本How to build a security modelDetermination method
Odoo 19.0Model-level ACL handles authorization, record rules filter row by row, and the two layers are stacked.Coarse first, then fine; the second layer is responsible for narrowing.
Odoo 20.0Groups, operations, and domains are uniformly defined in ir.accessAuthorization takes the union, restriction takes the conjunction

This difference is almost impossible to spot in code review. Rename an old file, move a field, make sure it loads and installs, and it looks like the migration is done. But the meaning of the policy has already changed: records that were previously blocked by the second layer may now be exposed because the first layer gained an extra group. And this is the most typical kind of silent privilege expansion—no errors, no alerts, just someone who should never have been able to see other people's data suddenly seeing a few extra rows in the search box one day.

2. Three company contexts—mix up one, and it can't be explained clearly

Permission issues immediately become an order of magnitude more complex in a multi-company architecture, because "company" has three different meanings in Odoo, while acceptance reports often only state "multi-company works normally".

ContextWhat does it correspond to in the system?The question it answers
Authorized MembershipWhich companies has the user been added toWhich companies is this identity eligible to choose?
Activated Companyenv.companies.ids, i.e. company_idsIn what scope does this operation take effect?
Current Companyenv.company.id, i.e., company_idWhich company's data was used for this value?

While reviewing the environment implementation in 20.0, Wavect found two places where it is easy to trip up. First, when the list of activated companies is empty, it falls back to the user's companies; it does not mean "deny all companies"—trying to use an empty context to achieve the effect of "no one is allowed to see anything" is treating an implementation detail as policy. Second, sudo mode skips this sanity check, so getting tests to pass with a high-privilege account does not prove that isolation for ordinary users holds.

So an acceptance report that says "multi-company isolation is normal" actually says nothing at all. It does not answer: which companies are authorized, which ones were activated this time, or whether the value obtained was 100.00 or 120.00. If the answers to these three questions differ, the conclusion may be completely opposite.

III. The Most Dangerous Line: Testing Only the Deny Rule Will Treat a Bad Configuration as a Success

Riedl used a small Python model that relies only on the standard library to run 16 fictional policy test cases, with an execution date of November 5, 2026, and all produced the expected observations. The value of these test cases lies not in their conclusions, but in the fact that they demonstrate one thing: permission acceptance must be tested in pairs.

Use case (fictional policy)ExpectedObservation
Activated own record in AAllowAllow
Activated other people's records in ARejectReject
B is authorized but not activated; read B recordRejectReject
After adding a broad group authorization, read other users' A recordsAllowed (authorization expanded)Allow
Broad group + global company restrictions, inactive BRejectReject
Omit global company restrictionsExpose inactive BAllow (misconfiguration)
Juxtapose the two global restrictions 'can only A' and 'can only B'A valid A record should be readableBlocked
Only global restrictions, no group authorizationRejectReject
Simply convert the old tiered policyOld rejections should remain rejectionsbecomes unexpectedly allowed
When the current company switches A / B, read the company value of the same documenttwo different values100.00 / 120.00
Visible A records are associated with B recordsAccess passes, relationship check should failRelationship inconsistency
Activated companies pass an empty listNeed clear policyFall back to membership, B can read

There are three rows in the table that are worth mentioning separately.

The first line is “Omitting the global company restriction.”It proves that this restriction is not decoration but the sole boundary: with it, even broad authorization can only see data from activated companies; without it, records from inactive companies are directly exposed. And this restriction is the easiest to delete as “redundant configuration” during migration, because after deletion the system runs more smoothly—without any errors.

The second line is that pair of mutually contradictory restrictions. "Only A" and "Only B" placed side by side will cause legitimate A records to be blocked along with them. If acceptance testing only checks forbidden access, this bad configuration will get full marks: everything that should be blocked is blocked. Therefore, every important denial must be paired with an allow control, proving that users can still get work done. This is not pedantry; it is to prevent the worst outcome, "block everything," from masquerading as the safest outcome.

The third line is 'simple conversion of the old layered policy'. A typical incorrect rewrite is to keep the old broad model authorization as a new broad record authorization and then place it alongside narrower authorizations; the union of the two groups turns the old 'deny other people's records' into 'allow'. The official access conversion source code (19.4-00-ir-access.py) makes inferences by combining groups and warns about the interaction between broad ACL groups and narrower rules. But note: a warning is a review requirement, not a pass credential; conversely, the absence of warnings in the logs does not mean the business policy has not been touched.

The most useless evidence is a screenshot. The disappearance of that row from the menu only shows that the frontend hid the entry; it does not show that reads, writes, and deletes are denied at the underlying layer. You need to test using direct record identifiers: whether this identity can retrieve that record by ID, whether it can modify it, and what the final state is after modification.

IV. Acceptance Matrix, and Three Actions for the CIO

To turn the above into a signable matrix, the dimensions required are actually very few: role × company context × operation. Each cell is filled with two things—the approved expectation, and the actual evidence on the upgrade system. The evidence must at least include an actual group set snapshot, build version, entry point, record identifier, and company context; destructive operations should only be performed on controlled records in a drill environment, and must include a test case for “allow modification”; otherwise “deny all” could also pass.

There is another prerequisite that is often skipped: a module must first have a version 20. After tallying the OCA repositories, third-party Odoo partner CloudSpinx gave these figures: of the roughly 2000 modules installable on Odoo 17, 1073 have a version 19, and only 66 have a version 20; of the 137 module folders on the OCA 20.0 branch, 45 are non-installable placeholders. Without installable modules, there is no permissions matrix to speak of—this and the “migration cliff” we wrote about in early November are two sides of the same wall.

16 test cases, four categories of coverage.The number of policy test cases executed on the local permission model on 2026-11-05, covering four categories: visibility, company context, values, and associations—all yielded the expected observations. The number is not large, but it is enough to illustrate the difference between "testing in pairs" and "testing only denials."

Three actions for CIOs and digital leaders, ranked by how much hassle they can save:

First, change the acceptance conclusion from “can log in, menus match” to “allow and deny pass in pairs.” For each key role, configure at least two company contexts (only A active, both A/B active), each with one allow case and one deny case, and test using direct record IDs rather than clicking menus. The report must be able to answer those three company questions; otherwise, this page is not considered complete.

Second, turn every warning from the converter into a disposition decision. For each one, write clearly: which group, which operation, and which type of record are affected; whether the conclusion is to tighten, retain, or change policy; and who approves it. In particular, accept one thing—an old denial is not necessarily the correct new rule, and an old allowance is not worth retaining either. Permission migration is not copying history; it is signing the policy once again.

Third, after access is granted, verify "value" and "association" separately.Visibility does not mean the value is correct: the same document may produce 100.00 and 120.00 under different current companies; readability also does not mean the association is valid: cross-company associations must be separately verified with check_company and _check_company_auto. There are also service accounts and scheduled tasks—they do not follow the manual path; their execution identity and company context must be recorded separately, and a controlled record marked "do not touch" should be placed alongside.

Scope note: Wavect explicitly states in the text that its verification is based on Odoo 19/20 official documentation, the 20.0 access implementation, and source conversion scripts, and did not run Odoo, did not execute a database upgrade, and did not run the official converter; the 16 use cases are results from small Python models, the downloaded native acceptance matrix remains NOT_RUN, and this does not constitute a security assessment of a real database. The OCA module count comes from CloudSpinx (a third-party Odoo partner)'s statistics on 270 non-archived repositories, has not been officially confirmed by OCA, and is only used to gauge the order of magnitude. This article cites these materials to explain the acceptance method and risk structure, and does not draw conclusions about any specific deployment.

The most dangerous outcome of permission migration is not “not being able to see what should be seen,” but “seeing what should not be seen, with no one noticing.” The former will prompt complaints; the latter will only remain quietly in the logs.

This is also why this Odoo 20 change deserves a separate article. It is not a feature update, but a semantic change: turning "two-layer stacking" into "a single evaluation", and "whether the configuration is correct" into "whether the combination is correct". The correctness of a combination has no default value; it can only be proven by paired test cases.

For enterprises currently scheduling the 19-to-20 upgrade window, the order of this should be reversed: first define the policy and acceptance matrix, then discuss the upgrade date. Because the upgrade window can be negotiated, but once privilege expansion goes live, what you face is no longer a project issue, but an incident that needs to be explained to audit.


Source: Wavect, "Odoo 20 Permission Migration: How to Validate Multi-Company Isolation?" (author Kevin Riedl, source verification date 2026-11-05, including Odoo 19/20 security reference comparison, the ir.access predicate, three company contexts, observed results from 16 policy use cases, the warning mechanism of the official conversion source code 19.4-00-ir-access.py, a runnable permission model, and the native acceptance matrix NOT_RUN declaration); Odoo official documentation 20.0 and 19.0 Security Reference (developer/reference/backend/security), 20.0 access domain evaluation implementation (base/models/ir_access.py), environment implementation (orm/environments.py), multi-company guide (howtos/company.rst, including check_company and _check_company_auto); CloudSpinx, "Odoo 17 End of Support: What an Upgrade Costs in Kenya" (OCA 270 non-archived repositories, per-module manifest statistics for branches 17.0–20.0, updated after October 2026).

Data scope note: All 16 use cases are local model results for fictional policies and were not executed against a real database, so they cannot be used as security assessment conclusions; the company values 100.00 and 120.00 are illustrative values, not real business data; the OCA module counts (2000 / 1073 / 66; 45 of 137 folders are placeholders) are based on third-party partner statistics and may differ in timing from OCA's official release cadence; before procurement and upgrade decisions, the actual manifest in the target version branch should prevail. On 2026-11-01, this account covered the Odoo 20 Community Edition migration cliff and OCA dependency risks; this article focuses on acceptance methods after permission semantic changes and does not repeat its version lifecycle and technical breakpoint list.

Zodioo Information (Zodioo) · Enterprise Digitalization Insights · 2026-11-11

关于我们

​我们致力于帮助中小企业实现数字化转型,我们的团队由一群充满激情和创新思维的专业人士组成,他们具备丰富的行业经验和技术专长。

扫一扫获取顾问以及手册

Sign in to leave a comment
A product can be a benchmark, a star, and a flagship at the same time, so three sets of materials need to be prepared.
Guangzhou Smart Product Reserve Pool accepts applications year-round and selects quarterly; inclusion is not a subsidy but exhibition booths and recommendations.