[FIX] l10n_ar: Fix compute for l10n_ar_vat field

This commit is contained in:
Katherine Zaoral
2019-09-11 14:26:45 +00:00
parent e80b81dca1
commit ae8e060cec
+2 -1
View File
@@ -47,7 +47,8 @@ class ResPartner(models.Model):
Validation can be also done by calling ensure_vat() method that returns the cuit or error if this one is not
found """
recs_ar_vat = self.filtered(lambda x: x.l10n_latam_identification_type_id.l10n_ar_afip_code == '80')
recs_ar_vat.l10n_ar_vat = True
for rec in recs_ar_vat:
rec.l10n_ar_vat = rec.vat
remaining = self - recs_ar_vat
remaining.l10n_ar_vat = False