diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index 8cb2845f81b..38f58df78d0 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -160,15 +160,13 @@ class hr_holidays(osv.osv):
return obj_res_leave.unlink(cr, uid, leave_ids)
def onchange_type(self, cr, uid, ids, holiday_type):
- result = {}
+ result = {'value': {'employee_id': False}}
if holiday_type == 'employee':
ids_employee = self.pool.get('hr.employee').search(cr, uid, [('user_id','=', uid)])
if ids_employee:
result['value'] = {
'employee_id': ids_employee[0]
}
- else:
- result['value'] = {'employee_id': False}
return result
# TODO: can be improved using resource calendar method
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index b9b4989f73e..6b1fdfebbef 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -36,8 +36,8 @@
-
+
@@ -234,6 +234,7 @@
tree
+