diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 1d7e701ed14..ba0a41259aa 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -106,7 +106,10 @@ class hr_timesheet_sheet(osv.osv): for att_tuple in attendance_tuples: if att_tuple[0] in [0,1,4]: if att_tuple[0] in [0,1]: - name = att_tuple[2]['name'] + if att_tuple[2] and att_tuple[2].has_key('name'): + name = att_tuple[2]['name'] + else: + name = self.pool['hr.attendance'].browse(cr, uid, att_tuple[1]).name else: name = self.pool['hr.attendance'].browse(cr, uid, att_tuple[1]).name date_attendances.append((1, name, att_tuple))