changeset 03eab07c529d in modules/currency_rs:default
details:
https://hg.tryton.org/modules/currency_rs?cmd=changeset&node=03eab07c529d
description:
Send only the required fields when fetching a readonly view definition
issue11134
review380081002
diffstat:
currency.py | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diffs (34 lines):
diff -r 7404d3142137 -r 03eab07c529d currency.py
--- a/currency.py Wed Apr 06 23:37:42 2022 +0200
+++ b/currency.py Fri Apr 08 19:07:13 2022 +0200
@@ -38,16 +38,15 @@
'required': Eval('source') == 'nbs_rs',
'invisible': Eval('source') != 'nbs_rs',
}
- _depends = ['source']
- rs_username = fields.Char("Username", states=_states, depends=_depends)
- rs_password = fields.Char("Password", states=_states, depends=_depends)
- rs_license_id = fields.Char("License ID", states=_states, depends=_depends)
+ rs_username = fields.Char("Username", states=_states)
+ rs_password = fields.Char("Password", states=_states)
+ rs_license_id = fields.Char("License ID", states=_states)
rs_list_type = fields.Selection(
- 'get_rs_list_types', "List Type", states=_states, depends=_depends)
+ 'get_rs_list_types', "List Type", states=_states)
_rs_list_types = Cache(__name__ + '.get_rs_list_types', context=False)
- del _states, _depends
+ del _states
@classmethod
def __setup__(cls):
@@ -59,8 +58,6 @@
('code', '=', 'RSD'),
()),
]
- if 'source' not in cls.currency.depends:
- cls.currency.depends.append('source')
@fields.depends('rs_username', 'rs_password', 'rs_license_id')
def _rs_client(self):