summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorYannick Vaucher <yannick.vaucher@camptocamp.com>2014-04-30 13:37:30 +0200
committerYannick Vaucher <yannick.vaucher@camptocamp.com>2014-04-30 13:37:30 +0200
commitc1601e75d37cea87cb41fd7fe501d2eb8fc5ff74 (patch)
tree687b07ef450f7842ce4730ef285f8b5d58acd335 /addons
parentc16d0fc4561c9a7c26997b9159b204ab1e795445 (diff)
[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
Diffstat (limited to 'addons')
-rw-r--r--addons/hr_timesheet_sheet/hr_timesheet_sheet.py3
1 files changed, 3 insertions, 0 deletions
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)