From 06cd145a79f023cafa4c94afbbad9f89fff829dc Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Mon, 3 Sep 2018 15:23:26 +0200 Subject: [PATCH] [FIX] sale_timesheet: fixup timesheet cost fixup e65c8826ef9969ee0c0416c8f5165525ee3f0809 fixup da2140b closes #26746 --- addons/sale_timesheet/models/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_timesheet/models/account.py b/addons/sale_timesheet/models/account.py index 121c1940000..7dc2411d53e 100644 --- a/addons/sale_timesheet/models/account.py +++ b/addons/sale_timesheet/models/account.py @@ -41,7 +41,7 @@ class AccountAnalyticLine(models.Model): emp = self.env['hr.employee'].search([('user_id', '=', user_id)], limit=1) account = values.get('account_id') and self.env['account.analytic.account'].browse([values['account_id']]) or self.account_id or emp.account_id cost = emp and emp.timesheet_cost or 0.0 - uom = account.company_id.sudo().project_time_mode_id + uom = account.sudo().company_id.project_time_mode_id # Nominal employee cost = 1 * company project UoM (project_time_mode_id) return { 'amount': -unit_amount * cost,