From b3934619d4688ea9019495ae6525f0e57416f5bb Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 24 Mar 2017 12:04:44 +0100 Subject: [PATCH] [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 --- addons/hr_holidays/models/hr_holidays.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/hr_holidays/models/hr_holidays.py b/addons/hr_holidays/models/hr_holidays.py index bd04de9a165..77ac17b5760 100644 --- a/addons/hr_holidays/models/hr_holidays.py +++ b/addons/hr_holidays/models/hr_holidays.py @@ -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)