From b9e988040e6f3398a459a1ba788f4ab63dcfb49b Mon Sep 17 00:00:00 2001 From: "Anh Thao Pham (pta)" Date: Tue, 8 Sep 2020 14:26:42 +0000 Subject: [PATCH] [FIX] hr_timesheet: fix timesheets encoded in days - Go to Timesheets > Configuration > Settings and select Days as Encoding Unit - Go to Project and create a Project with Timesheets activated - Open the created Project and create a Task - Edit the task and encode a timesheet line with 1 Day duration "Hours Spent" and "Remaining Hours" have incorrect values. The 1 day encoded is computed as 1 hour. Reverting: https://github.com/odoo/odoo/commit/2a7ec79c6a4563b608a4525ebccdea5978799caa opw-2328603 closes odoo/odoo#57379 X-original-commit: 8b3eed7418d6eea870f5e65ae238a304c88bd9f5 Signed-off-by: Anh Thao PHAM --- addons/hr_timesheet/models/ir_http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_timesheet/models/ir_http.py b/addons/hr_timesheet/models/ir_http.py index 940a55a5369..51e929b62af 100644 --- a/addons/hr_timesheet/models/ir_http.py +++ b/addons/hr_timesheet/models/ir_http.py @@ -17,5 +17,5 @@ class Http(models.AbstractModel): encoding_uom = company.timesheet_encode_uom_id result['timesheet_uom'] = encoding_uom.read(['name', 'rounding', 'timesheet_widget'])[0] - result['timesheet_uom_factor'] = company.timesheet_encode_uom_id._compute_quantity(1.0, encoding_uom, round=False) # convert encoding uom into stored uom to get conversion factor + result['timesheet_uom_factor'] = company.project_time_mode_id._compute_quantity(1.0, encoding_uom, round=False) # convert encoding uom into stored uom to get conversion factor return result