From 5b859cf3e0b28fc4ed87cd2c38cb4082932da88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 30 Oct 2019 13:22:22 +0100 Subject: [PATCH] Do not search remote value if view has no more the focus If the user switch the tab with a value filled in the entry, the search window is hidden and the all application is made insensitive. So we must ensure that the search window will be linked to the current view. This is ensured by a widget with the focus. issue8733 review288291002 --- tryton/gui/window/view_form/view/list_gtk/widget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/view/list_gtk/widget.py b/tryton/gui/window/view_form/view/list_gtk/widget.py index d391edfcde..d8dfea4690 100644 --- a/tryton/gui/window/view_form/view/list_gtk/widget.py +++ b/tryton/gui/window/view_form/view/list_gtk/widget.py @@ -695,7 +695,7 @@ class M2O(GenericText): callback() return - if model: + if model and common.get_toplevel_window().get_focus(): field = record[self.attrs['name']] win = self.search_remote(record, field, text, callback=callback) if len(win.screen.group) == 1: