Skip to content

Commit

Permalink
[FIX] Fixed bug by adding hr.group_hr_user group to field not availab…
Browse files Browse the repository at this point in the history
…le in hr.employee.public
  • Loading branch information
thomaspaulb authored and ntsirintanis committed Jul 27, 2023
1 parent cb5c4a8 commit 9d0af2a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions project_forecast_line/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ class HrJob(models.Model):
class HrEmployee(models.Model):
_inherit = "hr.employee"

# NB: these fields need to be marked as groups="hr.groups_hr_user",
# because otherwise if a user with less privileges tries to read
# hr.employee.public, they'll get an AccessError on these fields.
# More info at: https://github.com/odoo/odoo/blob/d21887008b1ac7
# 69bd91d24e972323ffe936391a/addons/hr/models/hr_employee.py#L22
role_ids = fields.One2many(
"hr.employee.forecast.role",
"employee_id",
Expand Down

0 comments on commit 9d0af2a

Please sign in to comment.