Skip to content

Commit f55aa29

Browse files
committed
Merge PR #4754 into 17.0
Signed-off-by pedrobaeza
2 parents 36eda04 + 7e02a3a commit f55aa29

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

l10n_es_aeat/models/res_partner.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@ def _parse_aeat_vat_info(self):
9797
self.ensure_one()
9898
vat_number = self.vat or ""
9999
prefix = vat_number[:2].upper()
100-
if self._map_aeat_country_code(prefix) in self._get_aeat_europe_codes():
101-
country_code = prefix
100+
aeat_country_code = self._map_aeat_country_code(prefix)
101+
if aeat_country_code in self._get_aeat_europe_codes():
102+
# Return mapped vats like Greece. Take into account mapped countries
103+
country_code = aeat_country_code
102104
vat_number = vat_number[2:]
103105
identifier_type = "02"
104106
else:

0 commit comments

Comments
 (0)