From 148fa9b24e4f6485ba12a4b961687f235ba0ee92 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 --- tryton/gui/window/view_form/view/form_gtk/dictionary.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tryton/gui/window/view_form/view/form_gtk/dictionary.py b/tryton/gui/window/view_form/view/form_gtk/dictionary.py index 2cdcabd045..a193b159b6 100644 --- a/tryton/gui/window/view_form/view/form_gtk/dictionary.py +++ b/tryton/gui/window/view_form/view/form_gtk/dictionary.py @@ -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(