[FIX] fix bug in hr 006

This commit is contained in:
odex 2024-07-09 14:13:41 +03:00
parent efcf187bcc
commit 13fc0f9c16
1 changed files with 1 additions and 1 deletions

View File

@ -1407,7 +1407,7 @@ class HRHolidays(models.Model):
prev_holiday = self.search([('employee_id', '=', self.employee_id.id),
('holiday_status_id', '=', self.holiday_status_id.id),
('type', '=', 'remove'),
('state', 'not in', ('refuse'))], limit=1, order="date_to desc")
('state', '!=', 'refuse')], limit=1, order="date_to desc")
if not prev_holiday: return
if not self.date_from : return
date_from, last_dt_to = fields.Date.from_string(self.date_from), fields.Date.from_string(prev_holiday.date_to)