Use identifier code for getting vat code

This commit is contained in:
Sergio Morillo 2018-12-31 09:01:50 +01:00
parent 405a42793e
commit 898a7a3c24
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ class BaseTrytonInvoiceMapper(Model):
def counterpart_nif(self, invoice):
nif = ''
if invoice.party.tax_identifier:
nif = invoice.party.tax_identifier
nif = invoice.party.tax_identifier.code
elif invoice.party.identifiers:
nif = invoice.party.identifiers[0].code
if nif.startswith('ES'):

View File

@ -28,4 +28,4 @@ class Party(metaclass=PoolMeta):
return identifier.code
return identifier.code[2:]
elif name == 'sii_vat_country':
return identifier[:2]
return identifier.code[:2]