make received and issued keys depends on book keys

This commit is contained in:
Àngel Àlvarez 2017-06-14 10:36:16 +02:00
parent bc51d1555e
commit 3c0af7c3fb
1 changed files with 2 additions and 2 deletions

View File

@ -25,12 +25,12 @@ class Invoice:
sii_issued_key = fields.Selection(SEND_SPECIAL_REGIME_KEY,
'SII Issued Key',
states={
'invisible': ~Eval('type').in_(['out_invoice', 'out_credit_note']),
'invisible': ~Eval('sii_book_key').in_(['E']),
})
sii_received_key = fields.Selection(RECEIVE_SPECIAL_REGIME_KEY,
'SII Recived Key',
states={
'invisible': Eval('type').in_(['out_invoice', 'out_credit_note']),
'invisible': ~Eval('sii_book_key').in_(['R']),
})
sii_subjected_key = fields.Selection(IVA_SUBJECTED, 'Subjected')
sii_excemption_key = fields.Selection(EXCEMPTION_CAUSE,