-
-
Notifications
You must be signed in to change notification settings - Fork 670
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
[15.0][FIX] hr_employee_birth_name: Fixed bug when accessing hr.employee #1160
[15.0][FIX] hr_employee_birth_name: Fixed bug when accessing hr.employee #1160
Conversation
@vincent-hatakeyama can you explain what bug is fixed? |
@nimarosa we are getting the following error using the module:
This is because Odoo has already prevented this situation here from line 21 to 27. Basically you need to add access rights to the field like this |
Wouldn't be better to add the data on the res.users profile in order to make it visible to the user: https://github.com/odoo/odoo/blob/15.0/addons/hr/models/res_users.py#L157-L163 |
I agree but I think this would be an improvement to add to a new issue/pr. |
6135bb1
to
a24ab80
Compare
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.
Add it following my comment please
Actually, this is the official way to fix this kind of problem: https://github.com/odoo/odoo/blob/c55badb8d70bdccfeb82bffb330d3f0b1b162ed1/addons/hr/models/hr_employee.py#L23, so I see it correct. |
For me this fix it's okay. I think we should merge since it's important to fix al permissions errors. Is this also affecting 14.0 branch? Or only 15.0? /ocabot merge patch |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 41ee265. Thanks a lot for contributing to OCA. ❤️ |
Looking at the code in 14.0, it seems affected too. |
@vincent-hatakeyama It would be good if you can port it to 14.0 and I think 16.0 will have the same problem. That way we maintain the same code in all versions. |
No description provided.