diff --git a/addons/hr_expense/hr_expense_view.xml b/addons/hr_expense/hr_expense_view.xml
index 1b8fd17dece..327a8ac3cd8 100644
--- a/addons/hr_expense/hr_expense_view.xml
+++ b/addons/hr_expense/hr_expense_view.xml
@@ -123,8 +123,8 @@
-
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index 0b4d9ab4542..f58e68ce7ed 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -182,6 +182,13 @@ class hr_holidays(osv.osv):
}
return result
+ def onchange_employee(self, cr, uid, ids, employee_id):
+ result = {'value': {'department_id': False}}
+ if employee_id:
+ employee = self.pool.get('hr.employee').browse(cr, uid, employee_id)
+ result['value'] = {'department_id': employee.department_id.id}
+ return result
+
# TODO: can be improved using resource calendar method
def _get_number_of_days(self, date_from, date_to):
"""Returns a float equals to the timedelta between two dates given as string."""
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index 89a526c9046..a5d31b127c6 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -115,7 +115,7 @@
-
+