Skip to content

[19.0][MIG] base_user_role: Migration to 19.0#382

Merged
OCA-git-bot merged 162 commits into
OCA:19.0from
tishmen:19.0-mig-base_user_role
Nov 27, 2025
Merged

[19.0][MIG] base_user_role: Migration to 19.0#382
OCA-git-bot merged 162 commits into
OCA:19.0from
tishmen:19.0-mig-base_user_role

Conversation

@tishmen

@tishmen tishmen commented Oct 9, 2025

Copy link
Copy Markdown

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.
@rousseldenis

Copy link
Copy Markdown

@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

tishmen commented Oct 11, 2025

Copy link
Copy Markdown
Author

@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.

@FrancoMaxime FrancoMaxime left a comment

Copy link
Copy Markdown
Member

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

tishmen commented Oct 15, 2025

Copy link
Copy Markdown
Author

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

@StefanRijnhart StefanRijnhart left a comment

Copy link
Copy Markdown
Member

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.

Comment thread base_user_role/models/user.py Outdated
Comment thread base_user_role/tests/test_user_role.py Outdated
@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

@StefanRijnhart StefanRijnhart left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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). 🤖

@StefanRijnhart

Copy link
Copy Markdown
Member

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 19.0-ocabot-merge-pr-382-by-StefanRijnhart-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit d82d43a into OCA:19.0 Nov 27, 2025
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 9b05edd. Thanks a lot for contributing to OCA. ❤️

help="Roles in which the group is involved",
)

parent_ids = fields.Many2many(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Several fields on this module are no longer required. For instance, the field parent_ids (added as a inverse of implied_ids) is now natively available as the field implied_by_ids, see odoo/odoo@34a50e8 for more information.

CC @desdelinux @moylop260

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.