-
-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[17.0][FIX] base_user_role : fix tests to group groups into a role #330
base: 17.0
Are you sure you want to change the base?
Conversation
e1f58eb
to
34acea2
Compare
Add force group recalculation in role assignment tests to handle Force parameter in set_groups_from_roles() ensures proper group Fix applied to all role assignment test methods to maintain consistent |
Hello @pedrobaeza |
I can't say about this one. |
@pedrobaeza Do you know how to ping? You made the "mistake" to help me once at last OCA days but I'm more then willing to spread my pings. |
You can ping module maintainers. Formally, the PR shouldn't change the module version (it's done by the bot), and that way, you clean it without the README changes. |
60cb771
to
43458cb
Compare
There are fixes which have been done for other Odoo versions, and we should probably try to port them first (the use of |
Hello @sebalix , |
I also ported missing commits for 16.0 and 18.0 there: |
afea8cd
to
1926428
Compare
…tegration tests Add force group recalculation in role assignment tests to handle group synchronization issues that occur when base_user_role and auditlog modules are both installed. Without forcing updates, tests fail in odoo.sh and OCA CI environments due to group assignment mismatches. Force parameter in set_groups_from_roles() ensures proper group synchronization regardless of auditlog's presence. No issues occur when base_user_role runs standalone. Fix applied to all role assignment test methods to maintain consistent behavior across test scenarios.
1926428
to
7b6a642
Compare
@mb-ife Ok, thanks for the feedback. What I do not like the way it is fixed here, is that it doesn't really test the feature as it should work: we update the roles on the user, and the call to So it's like hidding the issue, without explaining why it behaves this way: we probably have something else to fix in the design (in |
Indeed, if this is an issue in combination with auditlog, it's the issue that needs fixing, not the test. Can you tell us how to reproduce the issue? |
Hello @sebalix, @StefanRijnhart After investigating the test failure, I realized that simply adding a manual call to set_groups_from_roles(force=True) is not an adequate solution to the underlying issue. When the auditlog and base_user_role modules are installed together, the automatic group assignment for roles does not work as expected. To reproduce we only need to run a test with base_user_role and auditlog on the same folder. This is happening on Odoo 16 as well, and you can see a similar issue here #321. The error is triggered on OCA CI as well as on Odoo.sh. The easiest approach seems to be forcing the groups update in base_user_role. I would appreciate a second opinion on this approach. |
No description provided.