[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 <las@openerp.com>
This commit is contained in:
oco-odoo
2021-10-28 14:37:43 +00:00
parent 9a80e2fa47
commit 86601ea9f7
+1 -1
View File
@@ -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',