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 7bbd56b53b..d660ca29fb 100644 --- a/tryton/gui/window/view_form/view/form_gtk/dictionary.py +++ b/tryton/gui/window/view_form/view/form_gtk/dictionary.py @@ -111,7 +111,16 @@ class DictSelectionEntry(DictEntry): def get_value(self): text = self.widget.child.get_text() - return self._selection[text] + value = None + if text: + for txt, val in self._selection.items(): + if not val: + continue + if txt[:len(text)].lower() == text.lower(): + value = val + if len(txt) == len(text): + break + return value def set_value(self, value): values = dict(self.definition['selection'])