-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[16.0][FIX] audit_log: fix regression (Add/Remove User Group) #2834
[16.0][FIX] audit_log: fix regression (Add/Remove User Group) #2834
Conversation
5573382
to
04a8b85
Compare
@StefanRijnhart Could you please take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This should be safe as it's what core Odoo does first thing in res.users' own write
method: https://github.com/odoo/odoo/blob/47efddb/odoo/addons/base/models/res_users.py#L1611-L1612
To make sure this does not drop out in a future version, would it be possible to add a test?
@StefanRijnhart I'll do it asap (Next week) |
When adding/removing a group in a user (and tracking a user or a partner), odoo sends a 'reified' val 'in_group_{group_id}'. We must convert this value into the real groups_id one.
04a8b85
to
8de1324
Compare
@StefanRijnhart Done! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are beautiful tests, thank you!
@StefanRijnhart Do you know if it needs another review in order to be merged? |
@BT-anieto Yes, it does. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 lines of code
80lines of test !
thanks for this
LGTM
This PR has the |
/ocabot merge minor |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 5d16ec7. Thanks a lot for contributing to OCA. ❤️ |
When adding/removing a group in a user (and tracking a user or a partner), odoo sends a 'reified' val 'in_group_{group_id}'. We must convert this value into the real groups_id one.
This bug is now appearing after the merge of #2814 because of
server-tools/auditlog/models/rule.py
Line 395 in 7d79324
Steps to reproduce: