From c250bec9ffccd48375fdce382cc4bb6e84b086f4 Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Tue, 23 Jun 2020 14:15:39 +0000 Subject: [PATCH] [FIX] hr_timesheet: timesheet encoding unit of measure. Potentially wrong in multi-company environment. closes odoo/odoo#53513 Signed-off-by: Yannick Tivisse (yti) --- addons/hr_timesheet/models/hr_timesheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_timesheet/models/hr_timesheet.py b/addons/hr_timesheet/models/hr_timesheet.py index 540c3fe26ec..f8001201a57 100644 --- a/addons/hr_timesheet/models/hr_timesheet.py +++ b/addons/hr_timesheet/models/hr_timesheet.py @@ -51,7 +51,7 @@ class AccountAnalyticLine(models.Model): def _compute_encoding_uom_id(self): for analytic_line in self: - analytic_line.encoding_uom_id = self.env.company.timesheet_encode_uom_id + analytic_line.encoding_uom_id = analytic_line.company_id.timesheet_encode_uom_id @api.onchange('project_id') def onchange_project_id(self):