[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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user