From 1e6dce9d4edfccfe757a7e6249eed6e82aa18332 Mon Sep 17 00:00:00 2001 From: Wolfgang Taferner Date: Mon, 21 Dec 2020 15:13:48 +0000 Subject: [PATCH] [FIX] account: onchange of product and uom should not use currency rounding As the price_unit and the uom rounding can be more detailed than the currency/accounting rounding (2 decimals as a standard) to cut the number before subtotal is wrong. closes odoo/odoo#63817 X-original-commit: 1b4005f50ac45b53a73e0b95cfb661e8ccf040cd Signed-off-by: Nicolas Martinelli (nim) --- addons/account/models/account_move.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 71e5cd9e4f6..8012767df7b 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -3409,7 +3409,7 @@ class AccountMoveLine(models.Model): # Convert the unit price to the invoice's currency. company = line.move_id.company_id - line.price_unit = company.currency_id._convert(line.price_unit, line.move_id.currency_id, company, line.move_id.date) + line.price_unit = company.currency_id._convert(line.price_unit, line.move_id.currency_id, company, line.move_id.date, round=False) @api.onchange('product_uom_id') def _onchange_uom_id(self): @@ -3426,7 +3426,7 @@ class AccountMoveLine(models.Model): # Convert the unit price to the invoice's currency. company = self.move_id.company_id - self.price_unit = company.currency_id._convert(price_unit, self.move_id.currency_id, company, self.move_id.date) + self.price_unit = company.currency_id._convert(price_unit, self.move_id.currency_id, company, self.move_id.date, round=False) @api.onchange('account_id') def _onchange_account_id(self):