[FIX] hr_holidays: allow maternity leave during credit time
During a credit time period where the employee works zero hours, the employee should still be able to take maternity leave. Before this change this was only possible if you manually set the duration of this leave for it to be non-zero, which was kind of a hack. Now that durations are computed correctly automatically, maternity (and paternity) leaves were added to the list of exceptions of leave types that can be taken even if their duration is zero. Part-of: odoo/odoo#119317
This commit is contained in:
@@ -206,7 +206,7 @@ Contracts:
|
||||
|
||||
def _get_leaves_on_public_holiday(self):
|
||||
return super()._get_leaves_on_public_holiday().filtered(
|
||||
lambda l: l.holiday_status_id.work_entry_type_id.code not in ['LEAVE110', 'LEAVE280'])
|
||||
lambda l: l.holiday_status_id.work_entry_type_id.code not in ['LEAVE110', 'LEAVE210', 'LEAVE280'])
|
||||
|
||||
def _validate_leave_request(self):
|
||||
super(HrLeave, self)._validate_leave_request()
|
||||
|
||||
Reference in New Issue
Block a user