From 30d81999114633cb05afbe3dbd0cc33711f919cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 29 May 2008 09:45:13 +0200 Subject: [PATCH] Fix switch view when focus on many2one and record is not saved. --- tryton/gui/window/view_form/view/form_gtk/many2one.py | 2 ++ 1 file changed, 2 insertions(+) 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 c6b2fe145f..76de49768c 100644 --- a/tryton/gui/window/view_form/view/form_gtk/many2one.py +++ b/tryton/gui/window/view_form/view/form_gtk/many2one.py @@ -224,6 +224,8 @@ class Many2One(WidgetInterface): def sig_activate(self, widget, event=None): if not self.focus_out: return + if not self._view.modelfield: + return self.changed = False value = self._view.modelfield.get(self._view.model)