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 committed 2019-06-03 15:37:49 +02:00
1 parent e0cdb98186
commit 148fa9b24e
1 file changed
+2 -2
@@ -113,7 +113,7 @@ class DictSelectionEntry(DictEntry):
self._selection = {'': None}
width = 10
selection = self.definition['selection']
if self.definition.get('sorted', True):
if self.definition.get('sort', True):
selection.sort(key=operator.itemgetter(1))
for value, name in selection:
name = str(name)
@@ -430,7 +430,7 @@ class DictWidget(Widget):
def add_line(self, key):
key_schema = self.field.keys[key]
self.fields[key] = DICT_ENTRIES[key_schema['type_']](key, self)
self.fields[key] = DICT_ENTRIES[key_schema['type']](key, self)
field = self.fields[key]
text = key_schema['string'] + _(':')
label = Gtk.Label(