[FIX] fix bug in hr
This commit is contained in:
parent
453a773c81
commit
7fa265cb7a
|
|
@ -1409,7 +1409,7 @@ class HRHolidays(models.Model):
|
|||
('type', '=', 'remove'),
|
||||
('state', 'in', ('validate1', 'approved'))], limit=1, order="date_to desc")
|
||||
if not prev_holiday: return
|
||||
if not self.date_from or not self.date_to: 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)
|
||||
days_btwn = (date_from - last_dt_to).days - 1
|
||||
if days_btwn < 1: return
|
||||
|
|
|
|||
Loading…
Reference in New Issue