From 291bc4a69d4a057fb0a4e27a098a718d243555b3 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 11 Dec 2013 19:00:25 +0100 Subject: [PATCH] [FIX] hr_holidays: on change holiday type to employee tag, set employee to False. Otherwise, the user who creates the allocation request by employee tag will benefit of the leaves he just entered, twice if he has the employee tag, once if has not the employee tag(and in this last case, he should not have this leave allocation, as he do not have the tag bzr revid: dle@openerp.com-20131211180025-pg8kf13bt6d1vk9l --- addons/hr_holidays/hr_holidays.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 682508e0ca0..a30b874bd8a 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -242,6 +242,10 @@ class hr_holidays(osv.osv): result['value'] = { 'employee_id': ids_employee[0] } + elif holiday_type != 'employee': + result['value'] = { + 'employee_id': False + } return result def onchange_employee(self, cr, uid, ids, employee_id):