From 76a0d0acf61ea042fbf49efaa5e5591e35f46744 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Mon, 9 Sep 2013 12:37:49 +0200 Subject: [PATCH] [IMP] hr_timesheet_sheet - set default timezone as UTC if employee has none bzr revid: yannick.vaucher@camptocamp.com-20130909103749-sc1ia08hna4o6q8h --- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 5f51e8e3df1..76e6a90d292 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -371,7 +371,7 @@ class hr_attendance(osv.osv): for attendance in self.browse(cursor, user, ids, context=context): # Simulate timesheet in employee timezone - att_tz = timezone(attendance.employee_id.user_id.partner_id.tz) + att_tz = timezone(attendance.employee_id.user_id.partner_id.tz or 'utc') attendance_dt = datetime.strptime(attendance.name, DEFAULT_SERVER_DATETIME_FORMAT) att_tz_dt = pytz.utc.localize(attendance_dt)