Repository navigation
Conversation
Sync the README with what the module does: creations in superuser mode are
not restricted either, which was only stated in a code comment.
Export i18n with the module es.po set aside, so the terms shared with the
core keep the es_419 wording ("Display Name" now reads "Nombre en pantalla").
The module description is new in 20 (it is the README) and stays untranslated.
Contributor
|
@roboadhoc r+ nobump |
|
@mav-adhoc @les-adhoc because this PR has multiple commits, I need to know how to merge it:
|
Contributor
|
@roboadhoc rebase-ff |
|
Merge method set to rebase and fast-forward. |
roboadhoc
pushed a commit
that referenced
this pull request
Oct 22, 2026
Part-of: #158 Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
roboadhoc
pushed a commit
that referenced
this pull request
Oct 22, 2026
Part-of: #158 Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Tarea: https://www.adhoc.inc/odoo/project.task/76597
Code migration of
partner_creation_accessfrom 19.0 to 20.0. Behaviour ispreserved; no functional change is intended.
What changes
Only the security file. In 20.0
ir.model.accessandir.ruleare replaced byir.access, sosecurity/ir.model.access.csvbecomessecurity/ir.access.csv:perm_read=1, perm_write=1maps toru. The two zeros are not lost: in 19.0they did not restrict anything either, because access rights add up per group in
both versions. The xmlid is unchanged, so none is dropped and none is created.
No Python change was needed. Every symbol the module uses still exists in
20.0 with the same signature:
@api.model_create_multi(now inodoo/orm/decorators.py:318),self.env.su(odoo/orm/environments.py:61),res.users.has_group(odoo/addons/base/models/res_users.py:1195), and thefour groups it references —
base.group_partner_manager,base.group_public(not replaced by the new
base.group_everyone),sales_team.group_sale_salesman(record identical between 19.0 and 20.0) andbase.group_portal.dependsandauto_installare unchanged. The license staysAGPL-3: nodependency reaches Enterprise.
The README gains one paragraph stating something the module already does and
only a code comment explained: creations in superuser mode are not restricted
either. The i18n export realigns the terms shared with the core to their
es_419 wording; the module description is new in 20.0 (it is the README) and is
left untranslated on purpose.
Test plan
The module installs on a clean 20.0 database and its own tests pass
(
0 failed, 0 error(s) of 2 tests).Effective permissions on
res.partnerwere compared at runtime between a 19.0database and the migrated 20.0 one, granting each role on top of an internal
user, against a contact created by the superuser:
Identical in all four rows.
crmis not installed in either database, so thesalesman's write access comes from this module's own access row in both columns
— which is the direct evidence that the
1,1,0,0toruconversion kept thepermission.
To reproduce: install the module on a 20.0 database with
base,contactsandsale, create a user withbase.group_userplussales_team.group_sale_salesman, and check that it can read and write anycontact but cannot create one.
Not covered by the tests
The module's two tests only cover the
sudopath. Nothing asserts what themodule exists for, which is also the only file this migration touched: that a
salesman cannot create a contact, that a partner manager can, and that the
salesman keeps the write access granted by
ir.access.csv. The runtimecomparison above verified it, but it does not live in the repo. Adding those
tests is follow-up work, not part of this migration.
Not verified
This was not tested against a database coming from a real upgrade: the upgrade
pipeline does not run the 19.0 to 20.0 jump yet, so CI does not exercise it
either.