diff -r b38d2dfd7ba4 tryton/tryton/gui/window/attachment.py --- a/tryton/tryton/gui/window/attachment.py Tue Jun 07 11:25:03 2016 +0200 +++ b/tryton/tryton/gui/window/attachment.py Tue Jun 07 11:26:00 2016 +0200 @@ -22,7 +22,6 @@ ], mode=['tree', 'form'], context=context, exclude_field='resource') screen.search_filter() - screen.parent = record super(Attachment, self).__init__(screen, self.callback, view_type='tree') diff -r b38d2dfd7ba4 tryton/tryton/gui/window/view_form/screen/screen.py --- a/tryton/tryton/gui/window/view_form/screen/screen.py Tue Jun 07 11:25:03 2016 +0200 +++ b/tryton/tryton/gui/window/view_form/screen/screen.py Tue Jun 07 11:26:00 2016 +0200 @@ -338,7 +338,8 @@ 'ids': [self.id_get()], }, context=self.context.copy(), warning=False) else: - self.switch_view(view_type='form') + if not self.modified(): + self.switch_view(view_type='form') return True @property @@ -347,8 +348,6 @@ def switch_view(self, view_type=None): if self.current_view: - if not self.parent and self.modified(): - return self.current_view.set_value() if (self.current_record and self.current_record not in self.current_record.group):