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