[FIX] hr_holidays: don't do accrual allocation of time off for archived employees
opw-2071886 closes odoo/odoo#37451 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
committed by
Nicolas Martinelli
parent
84f7d33f72
commit
cc3f0313a2
@@ -158,7 +158,7 @@ class HolidaysAllocation(models.Model):
|
||||
"""
|
||||
today = fields.Date.from_string(fields.Date.today())
|
||||
|
||||
holidays = self.search([('allocation_type', '=', 'accrual'), ('state', '=', 'validate'), ('holiday_type', '=', 'employee'),
|
||||
holidays = self.search([('allocation_type', '=', 'accrual'), ('employee_id.active', '=', True), ('state', '=', 'validate'), ('holiday_type', '=', 'employee'),
|
||||
'|', ('date_to', '=', False), ('date_to', '>', fields.Datetime.now()),
|
||||
'|', ('nextcall', '=', False), ('nextcall', '<=', today)])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user