[FIX] l10n_ar: Properly compute fiscal position for Argentinian
companies. We revert the change we apply in order to let the user to define their own fiscal positions, now the fiscal position will be set depending on the afip responsability. With this change we fix the error that the fiscal position is properly setted for the customers that are of type "Responsable Inscription" and "Consumidor Final". Before this change the "Compras / Ventas en el Exterior" fiscal position was wrongly seted, now the fiscal position is leave empty so the related invoice taxes are properly matched closes odoo/odoo#38830 X-original-commit: 74f172041351e03f60b1aff0f0eb925e896cd1fa Signed-off-by: Josse Colpaert <jco@openerp.com>
This commit is contained in:
@@ -22,9 +22,7 @@ class AccountFiscalPosition(models.Model):
|
||||
]
|
||||
if self.env.context.get('force_company'):
|
||||
domain.append(('company_id', '=', self.env.context.get('force_company')))
|
||||
fp = self.search(domain, limit=1).id
|
||||
if fp:
|
||||
return fp
|
||||
return self.search(domain, limit=1).id
|
||||
return super().get_fiscal_position(partner_id, delivery_id=delivery_id)
|
||||
|
||||
@api.onchange('l10n_ar_afip_responsibility_type_ids', 'country_group_id', 'country_id', 'zip_from', 'zip_to')
|
||||
|
||||
Reference in New Issue
Block a user