diff --git a/tryton/gui/window/view_tree/view_tree.py b/tryton/gui/window/view_tree/view_tree.py index 4121083dbe..3281fac8fe 100644 --- a/tryton/gui/window/view_tree/view_tree.py +++ b/tryton/gui/window/view_tree/view_tree.py @@ -196,7 +196,7 @@ class ViewTreeModel(gtk.GenericTreeModel, gtk.TreeSortable): node = [] tree = self.tree for i in path: - if not tree: + if not tree or i >= len(tree): return None node.append((i, tree)) tree = tree[i][2]