changeset 456afb21b221 in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset&node=456afb21b221
description:
Consider Dict Char entries set to None as set to ""
issue10485
review346431002
diffstat:
tryton/gui/window/view_form/view/form_gtk/dictionary.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (25 lines):
diff -r f7d8d964d69d -r 456afb21b221
tryton/gui/window/view_form/view/form_gtk/dictionary.py
--- a/tryton/gui/window/view_form/view/form_gtk/dictionary.py Sun Sep 19
00:06:54 2021 +0200
+++ b/tryton/gui/window/view_form/view/form_gtk/dictionary.py Tue Sep 21
16:00:11 2021 +0200
@@ -65,6 +65,12 @@
self.widget.set_editable(not readonly)
+class DictCharEntry(DictEntry):
+
+ def modified(self, value):
+ return self.get_value() != (value.get(self.name, '') or '')
+
+
class DictBooleanEntry(DictEntry):
def create_widget(self):
@@ -365,7 +371,7 @@
DICT_ENTRIES = {
- 'char': DictEntry,
+ 'char': DictCharEntry,
'boolean': DictBooleanEntry,
'selection': DictSelectionEntry,
'multiselection': DictMultiSelectionEntry,