summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Ledoux <dle@openerp.com>2013-12-11 19:00:25 +0100
committerDenis Ledoux <dle@openerp.com>2013-12-11 19:00:25 +0100
commit291bc4a69d4a057fb0a4e27a098a718d243555b3 (patch)
treeb2708de81a7c8732bac7bca3a5d73d9bf728701c
parent942a10f2b37b06e71481bdd2224e533beff1646e (diff)
[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
-rw-r--r--addons/hr_holidays/hr_holidays.py4
1 files changed, 4 insertions, 0 deletions
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):