From 0490726b242a42e188840ad898b686cdca1b82eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 3 Jun 2019 15:37:49 +0200 Subject: [PATCH] Use same definition format for dict key than field This will allow to use the dict keys as relational fields and allow the client to use them for domain parsing. issue8295 review273311002 --- trytond/model/dictschema.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trytond/model/dictschema.py b/trytond/model/dictschema.py index 7c0e7f0de3..f862d8266e 100644 --- a/trytond/model/dictschema.py +++ b/trytond/model/dictschema.py @@ -117,7 +117,7 @@ class DictSchemaMixin(object): 'id': record.id, 'name': record.name, 'string': record.string, - 'type_': record.type_, + 'type': record.type_, 'domain': record.domain, } if record.type_ == 'selection': @@ -127,7 +127,7 @@ class DictSchemaMixin(object): english_key.selection_json)) selection.update(dict(json.loads(record.selection_json))) new_key['selection'] = list(selection.items()) - new_key['sorted'] = record.selection_sorted + new_key['sort'] = record.selection_sorted elif record.type_ in ('float', 'numeric'): new_key['digits'] = (16, record.digits) keys.append(new_key)