Skip to content

Commit

Permalink
Merge PR #1270 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Jul 17, 2023
2 parents e95c4fe + 233d219 commit 92963ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hr_employee_age/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
class HrEmployee(models.Model):
_inherit = "hr.employee"

age = fields.Integer(compute="_compute_age")
# The age field uses a depends (birthday) that has defined
# groups="hr.group_hr_user", if a user without permissions in HR tries to get
# the value of this field will have an error.
# The correct way to avoid this inconsistency is to define groups to field age
age = fields.Integer(compute="_compute_age", groups="hr.group_hr_user")

@api.depends("birthday")
def _compute_age(self):
Expand Down

0 comments on commit 92963ff

Please sign in to comment.