diff --git a/tryton/gui/window/view_tree/view_tree.py b/tryton/gui/window/view_tree/view_tree.py index e0e3b8bde1..4121083dbe 100644 --- a/tryton/gui/window/view_tree/view_tree.py +++ b/tryton/gui/window/view_tree/view_tree.py @@ -195,9 +195,9 @@ class ViewTreeModel(gtk.GenericTreeModel, gtk.TreeSortable): '''returns the node corresponding to the given path.''' node = [] tree = self.tree - if self.tree == []: - return None for i in path: + if not tree: + return None node.append((i, tree)) tree = tree[i][2] return node