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
This commit is contained in:
Cédric Krier
2019-06-03 15:37:49 +02:00
parent 1890542974
commit 0490726b24
+2 -2
View File
@@ -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)