changeset 69f94ebf6bd8 in modules/account_statement_rule:default
details:
https://hg.tryton.org/modules/account_statement_rule?cmd=changeset&node=69f94ebf6bd8
description:
Send only the required fields when fetching a readonly view definition
issue11134
review380081002
diffstat:
account.py | 25 ++++++++-----------------
1 files changed, 8 insertions(+), 17 deletions(-)
diffs (95 lines):
diff -r fcaf99bfac9a -r 69f94ebf6bd8 account.py
--- a/account.py Wed Apr 06 23:37:42 2022 +0200
+++ b/account.py Fri Apr 08 19:07:12 2022 +0200
@@ -74,8 +74,7 @@
If(Eval('company'),
('company', '=', Eval('company')),
()),
- ],
- depends=['company'])
+ ])
amount_low = Monetary(
"Amount Low", currency='currency', digits='currency',
domain=[If(Eval('amount_high'),
@@ -83,8 +82,7 @@
('amount_low', '=', None),
('amount_low', '<=', Eval('amount_high')),
],
- [])],
- depends=['amount_high'])
+ [])])
amount_high = Monetary(
"Amount High", currency='currency', digits='currency',
domain=[If(Eval('amount_low'),
@@ -92,8 +90,7 @@
('amount_high', '=', None),
('amount_high', '>=', Eval('amount_low')),
],
- [])],
- depends=['amount_low'])
+ [])])
description = fields.Char("Description",
help="The regular expression the description is searched with.\n"
"It may define the groups named:\n"
@@ -165,13 +162,11 @@
boolean = fields.Boolean("Boolean",
states={
'invisible': Eval('key_type') != 'boolean',
- },
- depends=['key_type'])
+ })
char = fields.Char("Char",
states={
'invisible': Eval('key_type') != 'char',
},
- depends=['key_type'],
help="The regular expression the key information is searched with.\n"
"It may define the groups named:\n"
"party, bank_account, invoice.")
@@ -179,8 +174,7 @@
'get_selections', "Selection",
states={
'invisible': Eval('key_type') != 'selection',
- },
- depends=['key_type'])
+ })
key_type = fields.Function(
fields.Selection('get_key_types', "Key Type"),
@@ -260,8 +254,7 @@
[])],
states={
'invisible': Eval('key_type') != name,
- },
- depends=['key_type', high_name]))
+ }))
setattr(cls, high_name,
type_("%s High" % string,
domain=[If(Eval(low_name),
@@ -272,8 +265,7 @@
[])],
states={
'invisible': Eval('key_type') != name,
- },
- depends=['key_type', low_name]))
+ }))
_add_range(StatementRuleInformation, 'integer', fields.Integer, "Integer")
@@ -295,7 +287,7 @@
context={
'company': Eval('company', -1),
},
- depends=['company'],
+ depends={'company'},
help="Leave empty to use the group named 'party' "
"from the regular expressions.")
account = fields.Many2One(
@@ -307,7 +299,6 @@
states={
'readonly': ~Eval('company'),
},
- depends=['company'],
help="Leave empty to use the party's receivable or payable account.\n"
"The rule must have a company to use this field.")