[FIX] fix bug in hr 006
This commit is contained in:
parent
efcf187bcc
commit
13fc0f9c16
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue