add functional fields identifier_type and vat_code
This commit is contained in:
parent
ff9222670c
commit
eda89857a0
13
aeat.py
13
aeat.py
|
@ -718,6 +718,19 @@ class SIIReportLine(ModelSQL, ModelView):
|
|||
company = fields.Many2One(
|
||||
'company.company', 'Company', required=True, select=True)
|
||||
|
||||
vat_code = fields.Function(fields.Char('VAT Code'), 'get_vat_code')
|
||||
identifier_type = fields.Function(
|
||||
fields.Selection(PARTY_IDENTIFIER_TYPE,
|
||||
'Identifier Type'), 'get_identifier_type')
|
||||
|
||||
def get_vat_code(self, name):
|
||||
return self.invoice.party.vat_code
|
||||
|
||||
def get_identifier_type(self, name):
|
||||
return self.invoice.party.identifier_type
|
||||
|
||||
|
||||
|
||||
@staticmethod
|
||||
def default_company():
|
||||
return Transaction().context.get('company')
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<tree string="AEAT SII Issued Lines">
|
||||
<tree string="AEAT SII Issued Lines" editable="bottom">
|
||||
<field name="report"/>
|
||||
<field name="invoice"/>
|
||||
<field name="vat_code"/>
|
||||
<field name="identifier_type"/>
|
||||
<field name="state"/>
|
||||
<field name="communication_code"/>
|
||||
<field name="communication_msg"/>
|
||||
|
|
Loading…
Reference in New Issue