Make taxes readonly until account is set
issue4749 review31351002
This commit is contained in:
1 parent
5ac101edf2
commit
3603099a2d
1 file changed
+2
-2
+2
-2
@@ -1501,9 +1501,9 @@ class InvoiceLine(ModelSQL, ModelView, TaxableMixin):
|
||||
],
|
||||
states={
|
||||
'invisible': Eval('type') != 'line',
|
||||
'readonly': _states['readonly'],
|
||||
'readonly': _states['readonly'] | ~Bool(Eval('account')),
|
||||
},
|
||||
depends=['type', 'invoice_type', 'company'] + _depends)
|
||||
depends=['type', 'invoice_type', 'company', 'account'] + _depends)
|
||||
invoice_taxes = fields.Function(fields.One2Many('account.invoice.tax',
|
||||
None, 'Invoice Taxes'), 'get_invoice_taxes')
|
||||
origin = fields.Reference('Origin', selection='get_origin', select=True,
|
||||
|
||||
Reference in new issue
Block a user