From 86601ea9f72f34c905dc24202885265d2589d355 Mon Sep 17 00:00:00 2001 From: oco-odoo Date: Mon, 25 Oct 2021 08:13:54 +0000 Subject: [PATCH] [FIX] account: fiscal positions: filter tax country properly in view In case the address of the company is in a different country as its fiscal country, the taxes available as "source tax" on the fiscal position lines were not the right ones (the country of the address was used to fetch them). closes odoo/odoo#79144 Signed-off-by: Laurent Smet --- 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 8969c8b38d1..92b54cc1b7d 100644 --- a/addons/account/models/partner.py +++ b/addons/account/models/partner.py @@ -31,7 +31,7 @@ class AccountFiscalPosition(models.Model): note = fields.Html('Notes', translate=True, help="Legal mentions that have to be printed on the invoices.") auto_apply = fields.Boolean(string='Detect Automatically', help="Apply automatically this fiscal position.") vat_required = fields.Boolean(string='VAT required', help="Apply only if partner has a VAT number.") - company_country_id = fields.Many2one(string="Company Country", related='company_id.country_id') + company_country_id = fields.Many2one(string="Company Country", related='company_id.account_fiscal_country_id') country_id = fields.Many2one('res.country', string='Country', help="Apply only if delivery country matches.") country_group_id = fields.Many2one('res.country.group', string='Country Group',