Remove some depecrated taxes, remove account_es_pyme and pass scenario test

This commit is contained in:
Raimon Esteve 2018-08-27 12:13:23 +02:00
parent a7ddf22c3b
commit 992af63267
6 changed files with 17 additions and 11620 deletions

View file

@ -170,7 +170,7 @@ class Invoice:
def _set_sii_keys(self): def _set_sii_keys(self):
tax = None tax = None
for t in self.taxes: for t in self.taxes:
if t.txa.tax_used: if t.tax.tax_used:
tax = t.tax tax = t.tax
break break
if not tax: if not tax:

11607
sii.xml

File diff suppressed because it is too large Load diff

View file

@ -12,7 +12,7 @@ Imports::
>>> from trytond.modules.company.tests.tools import create_company, \ >>> from trytond.modules.company.tests.tools import create_company, \
... get_company ... get_company
>>> from trytond.modules.account.tests.tools import create_fiscalyear, \ >>> from trytond.modules.account.tests.tools import create_fiscalyear, \
... create_chart, get_accounts, create_tax, set_tax_code ... create_chart, get_accounts, create_tax, create_tax_code
>>> from trytond.modules.account_invoice.tests.tools import \ >>> from trytond.modules.account_invoice.tests.tools import \
... set_fiscalyear_invoice_sequences ... set_fiscalyear_invoice_sequences
>>> today = datetime.date.today() >>> today = datetime.date.today()
@ -48,15 +48,21 @@ Create chart of accounts::
Create tax:: Create tax::
>>> tax = set_tax_code(create_tax(Decimal('.10'))) >>> TaxCode = Model.get('account.tax.code')
>>> tax = create_tax(Decimal('.10'))
>>> tax.sii_book_key = 'E' >>> tax.sii_book_key = 'E'
>>> tax.sii_issued_key = '01' >>> tax.sii_issued_key = '01'
>>> tax.sii_subjected_key = 'S1' >>> tax.sii_subjected_key = 'S1'
>>> tax.tax_used = True
>>> tax.save() >>> tax.save()
>>> invoice_base_code = tax.invoice_base_code >>> invoice_base_code = create_tax_code(tax, 'base', 'invoice')
>>> invoice_tax_code = tax.invoice_tax_code >>> invoice_base_code.save()
>>> credit_note_base_code = tax.credit_note_base_code >>> invoice_tax_code = create_tax_code(tax, 'tax', 'invoice')
>>> credit_note_tax_code = tax.credit_note_tax_code >>> invoice_tax_code.save()
>>> credit_note_base_code = create_tax_code(tax, 'base', 'credit')
>>> credit_note_base_code.save()
>>> credit_note_tax_code = create_tax_code(tax, 'tax', 'credit')
>>> credit_note_tax_code.save()
Create party:: Create party::
@ -195,7 +201,6 @@ Create AEAT Report::
>>> len(report.lines) >>> len(report.lines)
2 2
Credit invoice with refund:: Credit invoice with refund::
>>> credit = Wizard('account.invoice.credit', [invoice]) >>> credit = Wizard('account.invoice.credit', [invoice])
@ -203,7 +208,7 @@ Credit invoice with refund::
>>> credit.execute('credit') >>> credit.execute('credit')
>>> invoice.reload() >>> invoice.reload()
>>> invoice.state >>> invoice.state
'paid' u'paid'
>>> credit, = Invoice.find([('total_amount', '<', 0)]) >>> credit, = Invoice.find([('total_amount', '<', 0)])
>>> credit.sii_operation_key >>> credit.sii_operation_key
'R1' u'R1'

View file

@ -5,7 +5,6 @@ depends:
account_invoice_company_currency account_invoice_company_currency
account_es account_es
extras_depend: extras_depend:
account_es_pyme
sale sale
purchase purchase
account_invoice_intercompany account_invoice_intercompany

View file

@ -2,7 +2,7 @@
<!--The COPYRIGHT file at the top level of this repository <!--The COPYRIGHT file at the top level of this repository
contains the full copyright notices and license terms. --> contains the full copyright notices and license terms. -->
<data> <data>
<xpath expr="/form/notebook/page[@id=&quot;code&quot;]" position="after"> <xpath expr="/form/notebook/page[@name='legal_notice']" position="after">
<page string="AEAT SII" id="aeatsii"> <page string="AEAT SII" id="aeatsii">
<label name="tax_used"/> <label name="tax_used"/>
<field name="tax_used"/> <field name="tax_used"/>

View file

@ -2,7 +2,7 @@
<!--The COPYRIGHT file at the top level of this repository <!--The COPYRIGHT file at the top level of this repository
contains the full copyright notices and license terms. --> contains the full copyright notices and license terms. -->
<data> <data>
<xpath expr="/form/notebook/page[@id=&quot;code&quot;]" position="after"> <xpath expr="/form/notebook/page[@name='legal_notice']" position="after">
<page string="AEAT SII" id="aeatsii"> <page string="AEAT SII" id="aeatsii">
<label name="sii_book_key"/> <label name="sii_book_key"/>
<field name="sii_book_key"/> <field name="sii_book_key"/>