Hi OCA,
We’ve completed an Odoo 19 migration for base_user_role and would like to open a PR. Could you please create the 19.0 branch on this repository so we can submit it?
Summary of changes applied during the migration to 19.0:
- Replace removed
res.groups.category_id usage with the new privilege model:
- Add a
res.groups.privilege record “User roles” and link it to the ir.module.category “User roles”.
- In
res.users.role, introduce group_privilege_id (related to group_id.privilege_id).
- Keep
group_category_id as a read‑only related to the privilege’s category_id for display and grouping in the UI.
- Ensure newly created roles default their inherited group’s
privilege_id to the module’s “User roles” privilege.
- Update constraint API:
- Replace deprecated
_sql_constraints with models.Constraint for the unique (user_id, role_id) on res.users.role.line.
- Update role→group computation and user group syncing:
- Use
all_implied_ids (transitive closure) on groups as per v19.
- Use
group_ids (not groups_id) everywhere when setting user groups.
- Adjust views to v19 structure:
- The users list view no longer has
company_id; insert the role tags after the login column instead.
Files touched in the migration include (module paths):
OCA/base_user_role/models/role.py
OCA/base_user_role/models/user.py
OCA/base_user_role/views/user.xml
OCA/base_user_role/data/ir_module_category.xml
Once the 19.0 branch is available, I’ll open a PR with these changes.
Thanks!
— Milan Topuzov
Hi OCA,
We’ve completed an Odoo 19 migration for
base_user_roleand would like to open a PR. Could you please create the19.0branch on this repository so we can submit it?Summary of changes applied during the migration to 19.0:
res.groups.category_idusage with the new privilege model:res.groups.privilegerecord “User roles” and link it to their.module.category“User roles”.res.users.role, introducegroup_privilege_id(related togroup_id.privilege_id).group_category_idas a read‑only related to the privilege’scategory_idfor display and grouping in the UI.privilege_idto the module’s “User roles” privilege._sql_constraintswithmodels.Constraintfor the unique (user_id, role_id) onres.users.role.line.all_implied_ids(transitive closure) on groups as per v19.group_ids(notgroups_id) everywhere when setting user groups.company_id; insert the role tags after thelogincolumn instead.Files touched in the migration include (module paths):
OCA/base_user_role/models/role.pyOCA/base_user_role/models/user.pyOCA/base_user_role/views/user.xmlOCA/base_user_role/data/ir_module_category.xmlOnce the
19.0branch is available, I’ll open a PR with these changes.Thanks!
— Milan Topuzov