[14.0][FIX] user profile fix#59
Open
Murtaza-OSI wants to merge 2 commits into
Open
Conversation
Before this commit: if one product in one of the previous orders is archived, it won't load the order properly for order management. opw-3035231 closes odoo#105952 Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Expected Behaviour When a user goes to his own profile, he has two ways to change his password : 1. through the 'Account security' tab 2. through the 'Actions' > 'Change password' menu in list/form view Both option should let the user change its password, or one of the two should not be present Observed behaviour While the first one works as expected, the second option gives an error as the user doesn't have the admin rights Reproducibility This bug can be reproduced following these steps: 0. Make sure to have the "Employees" app installed 1. Connect as an employee (e.g. demo/demo on runbot) 2. Click on your name at the top right, go to 'My Profile' 3. Click 'Action' then 'Change password' Problem Root Cause There is an override of field_view_get for the res.users model in the hr module which elevates the user with sudo so that the user may modify their own user in some capacity. The problem is that by elevating the ACLs of the user, fields_view_get will also return actions that are not normally available to the user (e.g. deletion of user profile) Related Issues/PR - opw-2735671 closes odoo#83577 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.