34 lines
1.4 KiB
Diff
34 lines
1.4 KiB
Diff
diff -r 1713d4e8b30c tryton/tryton/gui/window/attachment.py
|
|
--- a/tryton/tryton/gui/window/attachment.py Tue Jun 07 11:45:12 2016 +0200
|
|
+++ b/tryton/tryton/gui/window/attachment.py Tue Jun 07 11:50:34 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 1713d4e8b30c tryton/tryton/gui/window/view_form/screen/screen.py
|
|
--- a/tryton/tryton/gui/window/view_form/screen/screen.py Tue Jun 07 11:45:12 2016 +0200
|
|
+++ b/tryton/tryton/gui/window/view_form/screen/screen.py Tue Jun 07 11:50:34 2016 +0200
|
|
@@ -354,7 +354,8 @@
|
|
'ids': [r.id for r in self.selected_records],
|
|
}, 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
|
|
@@ -363,8 +364,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):
|