Skip to content
Snippets Groups Projects
Commit d0aad0bf authored by Marc Durepos's avatar Marc Durepos
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#119109

Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
parent 997864c8
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment