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):
tax = None
for t in self.taxes:
if t.txa.tax_used:
if t.tax.tax_used:
tax = t.tax
break
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, \
... get_company
>>> 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 \
... set_fiscalyear_invoice_sequences
>>> today = datetime.date.today()
@ -48,15 +48,21 @@ Create chart of accounts::
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_issued_key = '01'
>>> tax.sii_subjected_key = 'S1'
>>> tax.tax_used = True
>>> tax.save()
>>> invoice_base_code = tax.invoice_base_code
>>> invoice_tax_code = tax.invoice_tax_code
>>> credit_note_base_code = tax.credit_note_base_code
>>> credit_note_tax_code = tax.credit_note_tax_code
>>> invoice_base_code = create_tax_code(tax, 'base', 'invoice')
>>> invoice_base_code.save()
>>> invoice_tax_code = create_tax_code(tax, 'tax', 'invoice')
>>> 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::
@ -195,7 +201,6 @@ Create AEAT Report::
>>> len(report.lines)
2
Credit invoice with refund::
>>> credit = Wizard('account.invoice.credit', [invoice])
@ -203,7 +208,7 @@ Credit invoice with refund::
>>> credit.execute('credit')
>>> invoice.reload()
>>> invoice.state
'paid'
u'paid'
>>> credit, = Invoice.find([('total_amount', '<', 0)])
>>> credit.sii_operation_key
'R1'
u'R1'

View File

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

View File

@ -2,7 +2,7 @@
<!--The COPYRIGHT file at the top level of this repository
contains the full copyright notices and license terms. -->
<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">
<label name="tax_used"/>
<field name="tax_used"/>

View File

@ -2,7 +2,7 @@
<!--The COPYRIGHT file at the top level of this repository
contains the full copyright notices and license terms. -->
<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">
<label name="sii_book_key"/>
<field name="sii_book_key"/>