Distinct readonly and editable states
This commit is contained in:
1 parent
e711ce7cb0
commit
56e1a24be4
59 files changed
+454
-317
No files matched your search
@@ -47,7 +47,8 @@ class Party(
|
||||
code = fields.Char(
|
||||
"Code", required=True,
|
||||
states={
|
||||
'readonly': Eval('code_readonly', True),
|
||||
'readonly': Eval('id', -1) >= 0,
|
||||
'editable': ~Eval('code_readonly', True),
|
||||
},
|
||||
help="The unique identifier of the party.")
|
||||
code_readonly = fields.Function(fields.Boolean('Code Readonly'),
|
||||
|
||||
Reference in new issue
Block a user