diff --git a/aeat.py b/aeat.py index fe8f69e..99d9c5f 100644 --- a/aeat.py +++ b/aeat.py @@ -756,7 +756,7 @@ class SIIReportLine(ModelSQL, ModelView): return self.invoice.party.vat_code def get_identifier_type(self, name): - return self.invoice.party.identifier_type + return self.invoice.party.sii_identifier_type @staticmethod def default_company(): diff --git a/aeat_mapping.py b/aeat_mapping.py index 43d61a6..e8cc5e9 100644 --- a/aeat_mapping.py +++ b/aeat_mapping.py @@ -33,8 +33,8 @@ class BaseTrytonInvoiceMapper(Model): not_exempt_kind = attrgetter('sii_subjected_key') counterpart_name = attrgetter('party.name') counterpart_nif = attrgetter('party.sii_vat_code') - counterpart_id_type = attrgetter('party.identifier_type') - counterpart_country = attrgetter('party.vat_country') + counterpart_id_type = attrgetter('party.sii_identifier_type') + counterpart_country = attrgetter('party.sii_vat_country') counterpart_id = counterpart_nif tax_rate = attrgetter('tax.rate') tax_base = attrgetter('base') diff --git a/locale/es_ES.po b/locale/es_ES.po index f31aa00..2a37971 100644 --- a/locale/es_ES.po +++ b/locale/es_ES.po @@ -206,7 +206,7 @@ msgctxt "field:company.company,private_key:" msgid "Private Key" msgstr "Clave privada" -msgctxt "field:party.party,identifier_type:" +msgctxt "field:party.party,sii_identifier_type:" msgid "Identifier Type" msgstr "Tipos de Identificador" diff --git a/party.py b/party.py index f279f39..b6b4ab5 100644 --- a/party.py +++ b/party.py @@ -11,12 +11,11 @@ class Party: __name__ = 'party.party' __metaclass__ = PoolMeta - # TODO: v4 change to party.identifier module - identifier_type = fields.Selection(aeat.PARTY_IDENTIFIER_TYPE, - 'Identifier Type') - sii_vat_code = fields.Function(fields.Char('VAT', size=9), + sii_identifier_type = fields.Selection(aeat.PARTY_IDENTIFIER_TYPE, + 'SII Identifier Type') + sii_vat_code = fields.Function(fields.Char('SII VAT Code', size=9), 'get_sii_vat_data') - sii_vat_country = fields.Function(fields.Char('VAT', size=2), + sii_vat_country = fields.Function(fields.Char('SII VAT Country', size=2), 'get_sii_vat_data') def get_sii_vat_data(self, name=None): diff --git a/view/party_form.xml b/view/party_form.xml index 7575eb2..f19e9f2 100644 --- a/view/party_form.xml +++ b/view/party_form.xml @@ -4,8 +4,8 @@ copyright notices and license types. --> -