Skip to content

Commit ff18f10

Browse files
committed
[FIX] l10n_es_aeat_sii_match: Extract company VAT properly
Previously, if you don't prefix the VAT company with "ES", the matching fails, as it was unconditionally strip the first 2 characters. Let's use the existing method that takes into account all the possible cases.
1 parent afe352f commit ff18f10

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

l10n_es_aeat_sii_match/models/aeat_sii_match_report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def _get_aeat_header(self):
423423
"IDVersionSii": SII_VERSION,
424424
"Titular": {
425425
"NombreRazon": self.company_id.name[0:120],
426-
"NIF": self.company_id.vat[2:],
426+
"NIF": self.company_id.partner_id._parse_aeat_vat_info()[2],
427427
},
428428
}
429429
return header

0 commit comments

Comments
 (0)