From 8f0f882fc048be2ec0332b5633103d7dd8a6c991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 6 Feb 2014 22:36:44 +0100 Subject: [PATCH] Fix find button in search window It should use the text filled in the search entry. And it should not close the window if nothing is found. review3101003 (transplanted from 8b22f7366f7caeb7ecbe86c28b8b4f8f3bf32627) --- tryton/gui/window/win_search.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tryton/gui/window/win_search.py b/tryton/gui/window/win_search.py index 388b1e0ba8..cc5e1cb057 100644 --- a/tryton/gui/window/win_search.py +++ b/tryton/gui/window/win_search.py @@ -109,10 +109,8 @@ class WinSearch(NoModal): if response_id == gtk.RESPONSE_OK: res = self.screen.sel_ids_get() elif response_id == gtk.RESPONSE_APPLY: - if not self.screen.search_filter(): - res = self.screen.sel_ids_get() - else: - return + self.screen.search_filter(self.screen.screen_container.get_text()) + return elif response_id == gtk.RESPONSE_ACCEPT: screen = Screen(self.model_name, domain=self.domain, context=self.context, mode=['form'])