From 4cab4b63bde93367e1035ea11ea489ae67e4e245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 4 Feb 2015 23:14:56 +0100 Subject: [PATCH] The search string when sorting should always be a string If the search string is None then the original search_value is set back and the result will be a mixed sorted list. issue4514 review8881003 --- tryton/gui/window/view_form/view/list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/view/list.py b/tryton/gui/window/view_form/view/list.py index 00b5dd84ae..cb2c516da0 100644 --- a/tryton/gui/window/view_form/view/list.py +++ b/tryton/gui/window/view_form/view/list.py @@ -546,7 +546,7 @@ class ViewTree(View): column.arrow.hide() model = self.treeview.get_model() unsaved_records = [x for x in model.group if x.id < 0] - search_string = self.screen.screen_container.get_text() or None + search_string = self.screen.screen_container.get_text() or u'' if (self.screen.search_count == len(model) or unsaved_records or self.screen.parent):