changeset 8d3c52dc5e69 in tryton:default details: https://hg.tryton.org/tryton?cmd=changeset&node=8d3c52dc5e69 description: Search and get keys in one request for Dict fields
issue10332 review349751003 diffstat: tryton/gui/window/view_form/model/field.py | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) diffs (23 lines): diff -r bdcdda37d2ad -r 8d3c52dc5e69 tryton/gui/window/view_form/model/field.py --- a/tryton/gui/window/view_form/model/field.py Tue May 18 22:32:45 2021 +0200 +++ b/tryton/gui/window/view_form/model/field.py Wed May 19 15:41:39 2021 +0200 @@ -1088,16 +1088,9 @@ for i in range(0, len(keys), batchlen): sub_keys = keys[i:i + batchlen] try: - key_ids = RPCExecute('model', schema_model, 'search', - [('name', 'in', sub_keys), domain], 0, - CONFIG['client.limit'], None, context=context) - except RPCException: - key_ids = [] - if not key_ids: - continue - try: - values = RPCExecute('model', schema_model, - 'get_keys', key_ids, context=context) + values = RPCExecute('model', schema_model, 'search_get_keys', + [('name', 'in', sub_keys), domain], CONFIG['client.limit'], + context=context) except RPCException: values = [] if not values: