Set states to tax template's invoice and credit note accounts

The states should be consistent with the tax

issue8530
review261891002
This commit is contained in:
Sergi Almacellas Abellana
2019-07-26 09:36:25 +02:00
parent 7b42f1faf9
commit 0c6bbbd7f3
+12 -2
View File
@@ -514,13 +514,23 @@ class TaxTemplate(sequence_ordered(), ModelSQL, ModelView, DeactivableMixin):
domain=[
('type.statement', '=', 'balance'),
('closed', '!=', True),
])
],
states={
'invisible': Eval('type') == 'none',
'required': Eval('type') != 'none',
},
depends=['type'])
credit_note_account = fields.Many2One(
'account.account.template', 'Credit Note Account',
domain=[
('type.statement', '=', 'balance'),
('closed', '!=', True),
])
],
states={
'invisible': Eval('type') == 'none',
'required': Eval('type') != 'none',
},
depends=['type'])
account = fields.Many2One('account.account.template', 'Account Template',
domain=[('parent', '=', None)], required=True)
legal_notice = fields.Text("Legal Notice")