From cbdb4cb8aa7193f16f50e3da685590398ea2b2ec Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Tue, 27 Apr 2021 13:33:01 +0000 Subject: [PATCH] [FIX] account: fix fiscal position mapping in pos Have a Fiscal position FPOS which map tax A to tax B Have products DEMO with tax A and DEMO2 Allow FPOS in POS, Open a session, activate FPOS, sell DEMO and DEMO2 Close POS Go to Orders, select the last one, hit return, edit, delete DEMO2 line Tax will be wrong. This occcur because the fiscal position mapping fail an equivalence check with a virtual record, so the tax is calculated as A and not B opw-2485399 closes odoo/odoo#69952 X-original-commit: 983797e626f742e84710de7ec8487824d6eaa7f1 Signed-off-by: oco-odoo Signed-off-by: agr-odoo --- addons/account/models/partner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/partner.py b/addons/account/models/partner.py index 2ae789a5327..950b350972a 100644 --- a/addons/account/models/partner.py +++ b/addons/account/models/partner.py @@ -71,7 +71,7 @@ class AccountFiscalPosition(models.Model): return taxes result = self.env['account.tax'] for tax in taxes: - taxes_correspondance = self.tax_ids.filtered(lambda t: t.tax_src_id == tax) + taxes_correspondance = self.tax_ids.filtered(lambda t: t.tax_src_id == tax._origin) result |= taxes_correspondance.tax_dest_id if taxes_correspondance else tax return result