diff --git a/addons/hr_attendance/report/attendance_by_month.py b/addons/hr_attendance/report/attendance_by_month.py index 17cf548345e..950f6ad0912 100644 --- a/addons/hr_attendance/report/attendance_by_month.py +++ b/addons/hr_attendance/report/attendance_by_month.py @@ -57,6 +57,7 @@ class report_custom(report_rml): if emp_ids: for emp in obj_emp.read(cr, uid, emp_ids, ['name']): stop, days_xml = False, [] + total_wh = 0.0 user_repr = ''' %s @@ -90,11 +91,15 @@ class report_custom(report_rml): else: ldt = dt # Week xml representation + total_wh += wh wh = hour2str(wh) today_xml = '%s' % ((today - month).days+1, (wh)) dy=(today - month).days+1 days_xml.append(today_xml) today, tomor = tomor, tomor + one_day + total_wh = hour2str(total_wh) + today_xml = '%s' % (total_wh) + days_xml.append(today_xml) user_xml.append(user_repr % '\n'.join(days_xml)) rpt_obj = pooler.get_pool(cr.dbname).get('hr.employee') @@ -172,8 +177,9 @@ class report_custom(report_rml): cell=cell+x width_dict[j]=x day_diff1=day_diff1-x + date_xml += [''] date_xml.append('') - date_xml.append('3.5cm%s\n' % (',0.74cm' * (int(dy)))) + date_xml.append('3.5cm%s,1.2cm\n' % (',0.74cm' * (int(dy)))) xml = ''' %s