Skip to content
Permalink
Browse files

[FIX] hr_timesheet: no leading 0 in report total

- Install timesheets and studio.
- In timesheets add a time of 0.5 ( half an hour).
- Enter studio
- Switch to the Reports tab, and click Timesheet Entries.

Before this commit:

The total time is displayed as 0:30.

After this commit:

The `report_timesheet_template` view has been modified to display the total
time as 00:30.
  • Loading branch information...
Florimond committed Oct 9, 2019
1 parent c6f1f05 commit 30c7f093d90d2695101e6271e9922a44ac76455f
Showing with 1 addition and 1 deletion.
  1. +1 −1 addons/hr_timesheet/report/report_timesheet_templates.xml
@@ -55,7 +55,7 @@
<td class="text-right"><strong>Total</strong></td>
<t t-set="total_value" t-value="sum(docs.mapped('unit_amount'))" />
<t t-set="sign" t-value="'-' if total_value &lt; 0 else ''"/>
<td class="text-right"><strong t-esc="sign + '%s:%02.0f' % tuple(int(round(x)) for x in divmod(abs(total_value)*60,60))"/></td>
<td class="text-right"><strong t-esc="sign + '%02d:%02.0f' % tuple(int(round(x)) for x in divmod(abs(total_value)*60,60))"/></td>
</tr>
</tbody>
</table>

0 comments on commit 30c7f09

Please sign in to comment.
You can’t perform that action at this time.