changeset 4fd1a5b8994e in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset;node=4fd1a5b8994e
description:
Do not return string in get_textual_value of Boolean
The textual value is used to set active which must be boolean.
It is simpler that in search_equal_func to cast result into string.
issue10019
review335481002
diffstat:
tryton/gui/window/view_form/view/list.py | 2 +-
tryton/gui/window/view_form/view/list_gtk/widget.py | 3 ---
2 files changed, 1 insertions(+), 4 deletions(-)
diffs (25 lines):
diff -r 65002d9965d4 -r 4fd1a5b8994e tryton/gui/window/view_form/view/list.py
--- a/tryton/gui/window/view_form/view/list.py Thu Feb 04 18:05:18 2021 +0100
+++ b/tryton/gui/window/view_form/view/list.py Fri Feb 12 20:37:04 2021 +0100
@@ -514,7 +514,7 @@
field.state_set(record, states=('invisible',))
if not field.get_state_attrs(record).get('invisible', False):
for widget in self.widgets[field_name]:
- text = widget.get_textual_value(record).lower()
+ text = str(widget.get_textual_value(record)).lower()
# Simple search by word
while text:
if text.startswith(key):
diff -r 65002d9965d4 -r 4fd1a5b8994e
tryton/gui/window/view_form/view/list_gtk/widget.py
--- a/tryton/gui/window/view_form/view/list_gtk/widget.py Thu Feb 04
18:05:18 2021 +0100
+++ b/tryton/gui/window/view_form/view/list_gtk/widget.py Fri Feb 12
20:37:04 2021 +0100
@@ -415,9 +415,6 @@
self.view.treeview.set_cursor(path)
return True
- def get_textual_value(self, record):
- return str(super().get_textual_value(record))
-
class URL(Char):