summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatherine Zaoral <kz@adhoc.com.ar>2019-10-10 14:31:39 +0000
committerfw-bot <otis@odoo.com>2019-10-15 16:47:01 +0000
commit252ae54c593f007e7d2abe5d0bea85eccf7920b3 (patch)
tree6210d9b309da63bbb17cfd8ce5e73477f8cfe72e
parente7c70e3635ace18150d8d9e7988dacbdd9486201 (diff)
[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>
-rw-r--r--addons/l10n_ar/models/account_fiscal_position.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/addons/l10n_ar/models/account_fiscal_position.py b/addons/l10n_ar/models/account_fiscal_position.py
index e00005ac62b..78ffee7ab2a 100644
--- a/addons/l10n_ar/models/account_fiscal_position.py
+++ b/addons/l10n_ar/models/account_fiscal_position.py
@@ -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')