[FIX] hr_holidays: Add missing context check

Backport of ead3f03
Fixes #4341
This commit is contained in:
Yannick Vaucher 2014-12-19 10:53:25 +01:00 committed by Martin Trigaux
parent 1adb3de371
commit 5906f10436
1 changed files with 2 additions and 0 deletions

View File

@ -95,6 +95,8 @@ class hr_holidays_status(osv.osv):
def name_get(self, cr, uid, ids, context=None):
if not ids:
return []
if context is None:
context = {}
if not context.get('employee_id',False):
# leave counts is based on empoyee_id, would be inaccurate if not based on correct employee