Skip to content
Snippets Groups Projects
Commit 4a748da4 authored by Yannick Tivisse's avatar Yannick Tivisse
Browse files

[FIX] hr: Correct implementation for 3be372cf

parent 465909f0
Branches
Tags
No related merge requests found
......@@ -116,7 +116,8 @@ class User(models.Model):
# However, in this case, we want the user to be able to read/write its own data,
# even if they are protected by groups.
# We make the front-end aware of those fields by sending all field definitions.
if not self.env.user.share:
profile_view = self.env.ref("hr.res_users_view_form_profile")
if profile_view and view_id == profile_view.id:
self = self.sudo()
return super(User, self).fields_view_get(view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment