From 7d0630b44828e8ceb4998cbe9bc0b15a440b22d4 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Thu, 14 Mar 2013 16:06:14 +0100 Subject: [PATCH] [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 --- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index c473670b014..2cf79596148 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -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