[FIX] hr_holidays: overlap constraint

Allow to request a leave that create exactly when another leave start.

Closes #33665

opw-1998762

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
Prakash Prajapati
2019-05-27 06:45:16 +00:00
parent ce39ca8a97
commit ddabee78e1
+1 -1
View File
@@ -425,7 +425,7 @@ class HolidaysRequest(models.Model):
def _check_date(self):
for holiday in self:
domain = [
('date_from', '<=', holiday.date_to),
('date_from', '<', holiday.date_to),
('date_to', '>', holiday.date_from),
('employee_id', '=', holiday.employee_id.id),
('id', '!=', holiday.id),