From 3afc97c42ea381d2870ebbfdd88af7c3ef03757d Mon Sep 17 00:00:00 2001 From: althaf shaik Date: Mon, 27 Feb 2023 12:05:16 +0000 Subject: [PATCH] [FIX] account: expected currency value in compute tax total. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Expected singleton res.currency() trace back that occurs in account/account_move : _compute_tax_total was caught by sentry. Because currency is not available when we remove journal_id in account_move. In res.company currency_id is a required field. So we are accessing currency value from res.company. Sentry-3946448424 closes odoo/odoo#113927 X-original-commit: 326ae981b767a9ae3cacd50099dcce354df591d8 Signed-off-by: William André (wan) --- addons/account/models/account_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index f7da620cb77..cd2028f4cbf 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1160,7 +1160,7 @@ class AccountMove(models.Model): kwargs = { 'base_lines': base_line_values_list, - 'currency': move.currency_id or move.journal_id.currency_id or move.journal_id.company_id.currency_id, + 'currency': move.currency_id or move.journal_id.currency_id or move.company_id.currency_id, } if move.id: