From 02fa854b043783d9cc639320f64a8702260b7241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Fri, 21 Sep 2012 15:46:10 +0200 Subject: [PATCH 1/2] call WinSearch callback even when WinForm do not yield result review529003 issue2782 --- tryton/gui/window/win_search.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tryton/gui/window/win_search.py b/tryton/gui/window/win_search.py index 7904820a0a..0f901d4cbc 100644 --- a/tryton/gui/window/win_search.py +++ b/tryton/gui/window/win_search.py @@ -120,6 +120,8 @@ class WinSearch(NoModal): record = screen.current_record res = [(record.id, record.value.get('rec_name', ''))] self.callback(res) + else: + self.callback(None) self.destroy() WinForm(screen, callback, new=True) return From 7be9c6205a67bd5d009f1b1dbf9725c81e41ae77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Fri, 21 Sep 2012 15:51:13 +0200 Subject: [PATCH 2/2] Fix deletion of readonly many2one issue2781 review528002 --- tryton/gui/window/view_form/view/form_gtk/many2one.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tryton/gui/window/view_form/view/form_gtk/many2one.py b/tryton/gui/window/view_form/view/form_gtk/many2one.py index fc5b0d3496..fbeebaa53f 100644 --- a/tryton/gui/window/view_form/view/form_gtk/many2one.py +++ b/tryton/gui/window/view_form/view/form_gtk/many2one.py @@ -286,6 +286,7 @@ class Many2One(WidgetInterface): and editable): self.sig_activate(widget, event, key_press=True) elif (self.has_target(self.field.get(self.record)) + and editable and event.keyval in (gtk.keysyms.Delete, gtk.keysyms.BackSpace)): self.wid_text.set_text('')