diff --git a/tryton/tryton/gui/window/view_form/view/list.py b/tryton/tryton/gui/window/view_form/view/list.py index d1d95652d5..4155dfe1fd 100644 --- a/tryton/tryton/gui/window/view_form/view/list.py +++ b/tryton/tryton/gui/window/view_form/view/list.py @@ -1032,6 +1032,10 @@ class ViewTree(View): def display(self, force=False): self.treeview.display_counter += 1 current_record = self.record + if current_record and current_record not in current_record.group: + # current record may have been removed by on_change calls without + # changing the current record of screen before the display + current_record = None if (force or not self.treeview.get_model() or self.group != self.treeview.get_model().group):