[FIX] hr_holidays: allow overlapping leaves and allocations request

The allocation requests have date fields that are only informative.
Having an allocation request (e.g. specifying dates of a public holiday)
overlapping the dates of a request is actually fine (if an employee is sick
during a public holidays, he can still use it for a leave request).

Closes #11026
This commit is contained in:
Martin Trigaux
2017-03-24 12:09:17 +01:00
parent 1217ae914b
commit b3934619d4
+1
View File
@@ -241,6 +241,7 @@ class Holidays(models.Model):
('date_to', '>=', holiday.date_from),
('employee_id', '=', holiday.employee_id.id),
('id', '!=', holiday.id),
('type', '=', holiday.type),
('state', 'not in', ['cancel', 'refuse']),
]
nholidays = self.search_count(domain)