Improve readonly states for currency
Set readonly only if there is a currency set
This commit is contained in:
1 parent
4e519ae197
commit
f3d641cb3c
1 file changed
+1
-1
+1
-1
@@ -258,7 +258,7 @@ class Invoice(OSV):
|
||||
required=True, states=_STATES, domain="[('party', '=', party)]")
|
||||
currency = fields.Many2One('currency.currency', 'Currency', required=True,
|
||||
states={
|
||||
'readonly': "state != 'draft' or bool(lines)",
|
||||
'readonly': "state != 'draft' or (bool(lines) and bool(currency))",
|
||||
})
|
||||
currency_digits = fields.Function('get_currency_digits', type='integer',
|
||||
string='Currency Digits', on_change_with=['currency'])
|
||||
|
||||
Reference in new issue
Block a user