Remove reset_sii_keys button from account invoice views. And update tests
This commit is contained in:
parent
bd0c4e8578
commit
91edea5316
|
@ -404,7 +404,6 @@ class Invoice(metaclass=PoolMeta):
|
|||
return 'R1' if self.untaxed_amount < Decimal('0.0') else 'F1'
|
||||
|
||||
@classmethod
|
||||
@ModelView.button
|
||||
def reset_sii_keys(cls, invoices):
|
||||
to_write = []
|
||||
for invoice in invoices:
|
||||
|
|
|
@ -140,9 +140,9 @@ Create invoice::
|
|||
|
||||
>>> invoice.sii_book_key == 'I'
|
||||
True
|
||||
>>> invoice.click('reset_sii_keys')
|
||||
>>> reset_sii_keys = Wizard('aeat.sii.reset.keys', models=[invoice])
|
||||
>>> reset_sii_keys.execute('reset')
|
||||
>>> invoice.reload()
|
||||
|
||||
>>> invoice.sii_book_key == 'E'
|
||||
True
|
||||
>>> invoice.click('post')
|
||||
|
@ -181,9 +181,9 @@ Create Credit invoice::
|
|||
>>> invoice.sii_issued_key = '02'
|
||||
>>> invoice.save()
|
||||
>>> invoice.reload()
|
||||
>>> invoice.click('reset_sii_keys')
|
||||
>>> reset_sii_keys = Wizard('aeat.sii.reset.keys', models=[invoice])
|
||||
>>> reset_sii_keys.execute('reset')
|
||||
>>> invoice.reload()
|
||||
|
||||
>>> invoice.sii_book_key == 'E'
|
||||
True
|
||||
>>> invoice.sii_operation_key == 'R1'
|
||||
|
@ -214,7 +214,7 @@ Credit invoice with refund::
|
|||
>>> credit.execute('credit')
|
||||
>>> invoice.reload()
|
||||
>>> invoice.state
|
||||
'cancel'
|
||||
'paid'
|
||||
>>> credit, = Invoice.find([('total_amount', '<', 0)])
|
||||
>>> credit.sii_operation_key
|
||||
'R1'
|
||||
|
|
|
@ -25,7 +25,6 @@ contains the full copyright notices and license terms. -->
|
|||
<field name="sii_state"/>
|
||||
<label name="sii_pending_sending"/>
|
||||
<field name="sii_pending_sending"/>
|
||||
<button name="reset_sii_keys" colspan="4"/>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
||||
|
|
|
@ -8,6 +8,5 @@ contains the full copyright notices and license terms. -->
|
|||
<field name="sii_communication_type"/>
|
||||
<field name="sii_state"/>
|
||||
<field name="sii_pending_sending"/>
|
||||
<button name="reset_sii_keys" tree_invisible="1"/>
|
||||
</xpath>
|
||||
</data>
|
||||
|
|
Loading…
Reference in New Issue