From 3f7ee21952147455dcc3d7eb552d4c86eb32d6d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 10 Feb 2014 22:24:21 +0100 Subject: [PATCH] Search for sequence on all views of one2many issue3642 review3201004 --- tryton/gui/window/view_form/view/form_gtk/one2many.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tryton/gui/window/view_form/view/form_gtk/one2many.py b/tryton/gui/window/view_form/view/form_gtk/one2many.py index 36e29a7921..5f191767d3 100644 --- a/tryton/gui/window/view_form/view/form_gtk/one2many.py +++ b/tryton/gui/window/view_form/view/form_gtk/one2many.py @@ -321,8 +321,11 @@ class One2Many(WidgetInterface): ctx = {} ctx.update(self.field.context_get(self.record)) sequence = None - if self.screen.current_view.view_type == 'tree': - sequence = self.screen.current_view.widget_tree.sequence + for view in self.screen.views: + if view.view_type == 'tree': + sequence = view.widget_tree.sequence + if sequence: + break def update_sequence(): if sequence: