Skip to content
Snippets Groups Projects
Commit ad315ab7 authored by Richard Mathot's avatar Richard Mathot
Browse files

[FIX] hr_holidays: don't do accrual allocation of time off for archived employees


opw-2071886

closes odoo/odoo#37401

Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
parent a3b47b1a
No related branches found
No related tags found
No related merge requests found
......@@ -146,7 +146,7 @@ class HolidaysAllocation(models.Model):
"""
today = fields.Date.from_string(fields.Date.today())
holidays = self.search([('accrual', '=', True), ('state', '=', 'validate'), ('holiday_type', '=', 'employee'),
holidays = self.search([('accrual', '=', True), ('employee_id.active', '=', True), ('state', '=', 'validate'), ('holiday_type', '=', 'employee'),
'|', ('date_to', '=', False), ('date_to', '>', fields.Datetime.now()),
'|', ('nextcall', '=', False), ('nextcall', '<=', today)])
......
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