diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 47fb0a0810d..1d7e701ed14 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -407,6 +407,9 @@ class hr_attendance(osv.osv): employee = employee_obj.browse(cr, uid, employee_id, context=context) tz = employee.user_id.partner_id.tz + if not date: + date = time.strftime(DEFAULT_SERVER_DATETIME_FORMAT) + att_tz = timezone(tz or 'utc') attendance_dt = datetime.strptime(date, DEFAULT_SERVER_DATETIME_FORMAT)