diff --git a/addons/hr_timesheet/report/report_timesheet_templates.xml b/addons/hr_timesheet/report/report_timesheet_templates.xml index fea714a5d7a..dbc0ad4a583 100644 --- a/addons/hr_timesheet/report/report_timesheet_templates.xml +++ b/addons/hr_timesheet/report/report_timesheet_templates.xml @@ -44,7 +44,7 @@ - + @@ -53,7 +53,9 @@ Total - + + + diff --git a/odoo/addons/base/ir/ir_qweb/fields.py b/odoo/addons/base/ir/ir_qweb/fields.py index 69cb3631e5d..5a9000598de 100644 --- a/odoo/addons/base/ir/ir_qweb/fields.py +++ b/odoo/addons/base/ir/ir_qweb/fields.py @@ -7,6 +7,7 @@ from odoo import api, fields, models, _ from PIL import Image import babel from lxml import etree +import math from odoo.tools import html_escape as escape, posix_to_ldml, safe_eval, float_utils, format_date, pycompat @@ -367,8 +368,9 @@ class FloatTimeConverter(models.AbstractModel): @api.model def value_to_html(self, value, options): - hours, minutes = divmod(value * 60, 60) - return '%02d:%02d' % (hours, minutes) + sign = math.copysign(1.0, value) + hours, minutes = divmod(abs(value) * 60, 60) + return '%02d:%02d' % (sign * hours, minutes) class DurationConverter(models.AbstractModel):