diff options
| author | Andrea Grazioso (agr-odoo) <agr@odoo.com> | 2021-04-27 13:33:01 +0000 |
|---|---|---|
| committer | Andrea Grazioso (agr-odoo) <agr@odoo.com> | 2021-04-27 13:33:01 +0000 |
| commit | 983797e626f742e84710de7ec8487824d6eaa7f1 (patch) | |
| tree | 8f21a66bf8be6f1cb4eba35eca5176be9e5dc90b | |
| parent | 54922b38ec2a7de6c3691bae1b23b7288236d04b (diff) | |
[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#69936
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
| -rw-r--r-- | addons/account/models/partner.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/models/partner.py b/addons/account/models/partner.py index cc92da1338e..f0354940098 100644 --- a/addons/account/models/partner.py +++ b/addons/account/models/partner.py @@ -56,7 +56,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 |
