Skip to content

Conversation

@tishmen
Copy link

@tishmen tishmen commented Oct 9, 2025

Scope

  • base_user_role only

Summary

  • Migrate to Odoo 19.0 following OCA guide.
  • API updates: group_ids rename, SUPERUSER_ID import from odoo.api.
  • Switch to models.Constraint and models.Index APIs.
  • Switch to res.groups privilege_id (drop category_id).
  • Replace trans_implied_ids usages with all_implied_ids where effective groups are expected.
  • Adjust search/tree view xpaths and <search><group> schema for 19.0.
  • Refactor default roles due to removal of default user in Odoo.

Pre-commit

  • Verified locally; auto-fixes applied and committed.

Tests

Command:

./odoo/odoo-bin -c odoo.conf -d bur19_tests_bur -i base_user_role --test-enable --test-tags "/base_user_role" --without-demo=all --log-level=info --stop-after-init

Result: green locally.

sebalix and others added 30 commits October 9, 2025 13:51
…608)

* [ADD] New module 'base_user_role'

* [FIX] base_user_role - Review

* [FIX] base_user_role - Review s/is_active/is_enabled/

* [FIX] base_user_role - Review s/is_active/is_enabled/

* [IMP] base_user_role - Translations updated (template + FR)

* [FIX] base_user_role - Lint
* FIX: Update users' groups when a role is deleted
* IMP: add some test cases to check user's groups when its last role line is removed
* FIX: ensure that the user's groups are updated when its last role line is removed
Currently translated at 100,0% (37 of 37 strings)

Translation: server-backend-11.0/server-backend-11.0-base_user_role
Translate-URL: https://translation.odoo-community.org/projects/server-backend-11-0/server-backend-11-0-base_user_role/da/
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
the groups that have changed with respecto the role.
…users.role.line"

This reverts commit b537941d5a2d1fcb3fbacc602124c1b3f6e1d495.
tishmen pushed a commit to tishmen/server-backend that referenced this pull request Oct 9, 2025
@tishmen tishmen marked this pull request as ready for review October 9, 2025 13:22
@tishmen tishmen marked this pull request as draft October 9, 2025 13:24
@tishmen
Copy link
Author

tishmen commented Oct 9, 2025

Base migration PR for the role stack. Two downstream PRs depend on this PR via a temporary test requirement, following OCA guidance:

https://github.com/OCA/maintainer-tools/wiki/Use-temporary-reference(s)-to-another-pull-request(s)

Dependent PRs

Notes

  • The dependents include a commit titled "[DON'T MERGE] test-requirements.txt"; we will drop that commit once this base PR is merged.
  • Local tests are green. Command used:
./odoo/odoo-bin -c odoo.conf -d bur19_tests_bur -i base_user_role --test-enable --test-tags "/base_user_role" --without-demo=all --log-level=info --stop-after-init

Maintainers ping

  • @sebalix @jcdrubay @novawish — thanks in advance for an initial look. This PR is kept as draft; happy to mark ready once you prefer.

@rousseldenis
Copy link

/ocabot migration base_user_role

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Oct 11, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Oct 11, 2025
7 tasks
@rousseldenis
Copy link

@tishmen Is this ready ? Some of commits can be squashed in migration one. If there are improvements, they can stay but making module name appear in commit message. Thanks

@tishmen
Copy link
Author

tishmen commented Oct 11, 2025

@rousseldenis From my side this is ready for another look; The module is installing and checks/tests are passing.
I’ll squash the migration-only changes into a single “[19.0] [MIG] …” commit and ping you once done.

Copy link
Member

@FrancoMaxime FrancoMaxime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM: code review.

I agree with @rousseldenis comment.

@tishmen tishmen force-pushed the 19.0-mig-base_user_role branch from 85eaf43 to 98cfee7 Compare October 15, 2025 17:56
@tishmen
Copy link
Author

tishmen commented Oct 15, 2025

@FrancoMaxime @rousseldenis The commits have been squashed as suggested, please check the last commit for the full diff. Thank you!

Copy link
Member

@StefanRijnhart StefanRijnhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase to include #375
Include the version bump in the actual migration commit (it now has its own, unconventional commit) and rename the actual migration commit to adhere to the pattern [19.0][MIG] <module>: Migration to 19.0.

@tishmen tishmen force-pushed the 19.0-mig-base_user_role branch from 77c6293 to a3ac908 Compare November 9, 2025 22:50
@tishmen tishmen force-pushed the 19.0-mig-base_user_role branch 2 times, most recently from 5a03f11 to 390affc Compare November 9, 2025 23:03
Copy link
Member

@StefanRijnhart StefanRijnhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.