From c1601e75d37cea87cb41fd7fe501d2eb8fc5ff74 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Wed, 30 Apr 2014 13:37:30 +0200 Subject: [PATCH] [FIX] sign in and sign out were broken in rev 10019 as it doesn't provide a date to conversion of attendance time to employee timezone lp bug: https://launchpad.net/bugs/1314589 fixed bzr revid: yannick.vaucher@camptocamp.com-20140430113730-cn3xw66fbik8p32n --- addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 3 +++ 1 file changed, 3 insertions(+) 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)