From 1f159ce453faeb8ff8fdec9ac78838734de6d7cd Mon Sep 17 00:00:00 2001 From: "Jay (OpenERP)" Date: Thu, 7 Oct 2010 11:09:21 +0530 Subject: [PATCH] [FIX] hr_attendance : correction on attendance by week report lp bug: https://launchpad.net/bugs/654931 fixed bzr revid: jvo@tinyerp.com-20101007053921-bdbg48glsn4xi27f --- addons/hr_attendance/report/timesheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_attendance/report/timesheet.py b/addons/hr_attendance/report/timesheet.py index 096de11664e..b0845422655 100644 --- a/addons/hr_attendance/report/timesheet.py +++ b/addons/hr_attendance/report/timesheet.py @@ -82,7 +82,7 @@ class report_custom(report_rml): for att in attendances: dt = datetime.strptime(att['name'], '%Y-%m-%d %H:%M:%S') if att['action'] == 'sign_out': - week_wh[ldt.date().weekday()] = week_wh.get(ldt.date().weekday(), 0) + (dt - ldt).hours + week_wh[ldt.date().weekday()] = week_wh.get(ldt.date().weekday(), 0) + ((dt - ldt).seconds/3600) ldt = dt # Week xml representation