From ef1c8385a1be0ce17bbeefc0ebed8c073fffa03c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 17 Nov 2015 13:30:15 +0100 Subject: [PATCH] [FIX] hr_holidays: allocation by tag Revision 1e90257e588732312dc115d5617dc8234fa3c34a removed hierarchy in hr.employee.category model. Indeed they are used and displayed like tags and not like hierarchical categories anymore. However the allocation by tag was still using the childof operator to go through hierarchy. No need to do that anymore. --- addons/hr_holidays/hr_holidays.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 3408778a940..346aca17fbc 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -426,7 +426,7 @@ class hr_holidays(osv.osv): self._create_resource_leave(cr, uid, [record], context=context) self.write(cr, uid, ids, {'meeting_id': meeting_id}) elif record.holiday_type == 'category': - emp_ids = obj_emp.search(cr, uid, [('category_ids', 'child_of', [record.category_id.id])]) + emp_ids = record.category_id.employee_ids.ids leave_ids = [] batch_context = dict(context, mail_notify_force_send=False) for emp in obj_emp.browse(cr, uid, emp_ids, context=context):