Skip to content
Snippets Groups Projects
Commit ff4e7d6a authored by Marc Durepos's avatar Marc Durepos Committed by Kevin Baptiste
Browse files

[FIX] hr_attendance: prevent error caused by pre-fetching non-public employee fields


  Fixes a situation where users who are part of the Attendances Officer (or Manager) group but
  without access to private employee data would see the following error when trying to book time
  off.

  `ValueError: Invalid field 'last_check_in' on model 'hr.employee.public'`

  Other instances of the same ValueError were observed by managers trying to approve employee leave
  and employee expenses.

  As per hr/models/hr_employee.py:22-26 fields not available on hr.employee.public should have
  groups='hr.group_hr_user' and this was not the case in hr_attendance.

closes odoo/odoo#120259

X-original-commit: d0aad0bf
Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
parent 6232896f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment