[FIX] hr_attendance : correction on attendance by week report
[odoo/odoo.git] / addons / hr_attendance / report / timesheet.py
index 096de11..b084542 100644 (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