[FIX]hr_timesheet_sheet: fix user_id variable referenced before assignment when no employee_id

specified in onchange_employee_id

bzr revid: csn@openerp.com-20130314150614-bsnwc4gk7a9eyri0
This commit is contained in:
Cedric Snauwaert 2013-03-14 16:06:14 +01:00
parent eed1a93749
commit 7d0630b448
1 changed files with 1 additions and 0 deletions

View File

@ -217,6 +217,7 @@ class hr_timesheet_sheet(osv.osv):
def onchange_employee_id(self, cr, uid, ids, employee_id, context=None):
department_id = False
user_id = False
if employee_id:
empl_id = self.pool.get('hr.employee').browse(cr, uid, employee_id, context=context)
department_id = empl_id.department_id.id