Merge pull request #135 from expsa/abuzar_task_hr

[FIX] fix bug in hr 006
This commit is contained in:
AbuzarExp 2024-07-09 14:15:46 +03:00 committed by GitHub
commit d24a90c71e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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)