[FIX] hr_attendance : correction on attendance by week report

lp bug: https://launchpad.net/bugs/654931 fixed

bzr revid: jvo@tinyerp.com-20101007053921-bdbg48glsn4xi27f
This commit is contained in:
Jay (OpenERP)
2010-10-07 11:09:21 +05:30
parent 209c2f59c8
commit 1f159ce453
+1 -1
View File
@@ -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