diff options
Diffstat (limited to 'addons/hr_holidays')
| -rw-r--r-- | addons/hr_holidays/models/hr_employee.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/addons/hr_holidays/models/hr_employee.py b/addons/hr_holidays/models/hr_employee.py index 4fe06f6a857..7585a67cfe7 100644 --- a/addons/hr_holidays/models/hr_employee.py +++ b/addons/hr_holidays/models/hr_employee.py @@ -204,3 +204,13 @@ class HrEmployeeBase(models.AbstractModel): allocations = self.env['hr.leave.allocation'].sudo().search([('state', 'in', ['draft', 'confirm']), ('employee_id', 'in', self.ids)]) allocations.write(hr_vals) return res + +class HrEmployeePrivate(models.Model): + _inherit = 'hr.employee' + +class HrEmployeePublic(models.Model): + _inherit = 'hr.employee.public' + + def _compute_leave_status(self): + super()._compute_leave_status() + self.current_leave_id = False |
