Rename to sii_identifier_type party field
This commit is contained in:
parent
7444d27cf3
commit
70859df826
2
aeat.py
2
aeat.py
|
@ -756,7 +756,7 @@ class SIIReportLine(ModelSQL, ModelView):
|
||||||
return self.invoice.party.vat_code
|
return self.invoice.party.vat_code
|
||||||
|
|
||||||
def get_identifier_type(self, name):
|
def get_identifier_type(self, name):
|
||||||
return self.invoice.party.identifier_type
|
return self.invoice.party.sii_identifier_type
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def default_company():
|
def default_company():
|
||||||
|
|
|
@ -33,8 +33,8 @@ class BaseTrytonInvoiceMapper(Model):
|
||||||
not_exempt_kind = attrgetter('sii_subjected_key')
|
not_exempt_kind = attrgetter('sii_subjected_key')
|
||||||
counterpart_name = attrgetter('party.name')
|
counterpart_name = attrgetter('party.name')
|
||||||
counterpart_nif = attrgetter('party.sii_vat_code')
|
counterpart_nif = attrgetter('party.sii_vat_code')
|
||||||
counterpart_id_type = attrgetter('party.identifier_type')
|
counterpart_id_type = attrgetter('party.sii_identifier_type')
|
||||||
counterpart_country = attrgetter('party.vat_country')
|
counterpart_country = attrgetter('party.sii_vat_country')
|
||||||
counterpart_id = counterpart_nif
|
counterpart_id = counterpart_nif
|
||||||
tax_rate = attrgetter('tax.rate')
|
tax_rate = attrgetter('tax.rate')
|
||||||
tax_base = attrgetter('base')
|
tax_base = attrgetter('base')
|
||||||
|
|
|
@ -206,7 +206,7 @@ msgctxt "field:company.company,private_key:"
|
||||||
msgid "Private Key"
|
msgid "Private Key"
|
||||||
msgstr "Clave privada"
|
msgstr "Clave privada"
|
||||||
|
|
||||||
msgctxt "field:party.party,identifier_type:"
|
msgctxt "field:party.party,sii_identifier_type:"
|
||||||
msgid "Identifier Type"
|
msgid "Identifier Type"
|
||||||
msgstr "Tipos de Identificador"
|
msgstr "Tipos de Identificador"
|
||||||
|
|
||||||
|
|
9
party.py
9
party.py
|
@ -11,12 +11,11 @@ class Party:
|
||||||
__name__ = 'party.party'
|
__name__ = 'party.party'
|
||||||
__metaclass__ = PoolMeta
|
__metaclass__ = PoolMeta
|
||||||
|
|
||||||
# TODO: v4 change to party.identifier module
|
sii_identifier_type = fields.Selection(aeat.PARTY_IDENTIFIER_TYPE,
|
||||||
identifier_type = fields.Selection(aeat.PARTY_IDENTIFIER_TYPE,
|
'SII Identifier Type')
|
||||||
'Identifier Type')
|
sii_vat_code = fields.Function(fields.Char('SII VAT Code', size=9),
|
||||||
sii_vat_code = fields.Function(fields.Char('VAT', size=9),
|
|
||||||
'get_sii_vat_data')
|
'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')
|
'get_sii_vat_data')
|
||||||
|
|
||||||
def get_sii_vat_data(self, name=None):
|
def get_sii_vat_data(self, name=None):
|
||||||
|
|
|
@ -4,8 +4,8 @@ copyright notices and license types. -->
|
||||||
<data>
|
<data>
|
||||||
<xpath expr="/form/notebook/page[@name='identifiers']/field[@name='identifiers']"
|
<xpath expr="/form/notebook/page[@name='identifiers']/field[@name='identifiers']"
|
||||||
position="before">
|
position="before">
|
||||||
<label name="identifier_type"/>
|
<label name="sii_identifier_type"/>
|
||||||
<field name="identifier_type"/>
|
<field name="sii_identifier_type"/>
|
||||||
<newline/>
|
<newline/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</data>
|
</data>
|
||||||
|
|
Loading…
Reference in New Issue