diff --git a/src/screen.js b/src/screen.js index df7baceac1..f176ab6105 100644 --- a/src/screen.js +++ b/src/screen.js @@ -702,9 +702,6 @@ }, switch_view: function(view_type) { if (this.current_view) { - if (!this.group.parent && this.modified()) { - return jQuery.when(); - } this.current_view.set_value(); if (this.current_record && !~this.current_record.group.indexOf( @@ -960,7 +957,9 @@ 'ids': [this.get_id()] }, jQuery.extend({}, this.context), false); } else { - this.switch_view('form'); + if (!this.modified()) { + this.switch_view('form'); + } } }, get_id: function() { diff --git a/src/window.js b/src/window.js index 7cff75d643..de32a491ef 100644 --- a/src/window.js +++ b/src/window.js @@ -393,7 +393,6 @@ }); screen.switch_view().done(function() { screen.search_filter(); - screen.group.parent = record; }); Sao.Window.Attachment._super.init.call(this, screen, this.callback, {view_type: 'tree'}); @@ -427,7 +426,6 @@ }); screen.switch_view().done(function() { screen.search_filter(); - screen.group.parent = record; }); Sao.Window.Note._super.init.call(this, screen, this.callback, {view_type: 'tree'});