[FIX] web: revert c1d48362d3 and consider there is a previous dialog only if isDestroyed returns False

This commit is contained in:
Denis Ledoux 2014-10-10 14:09:05 +02:00
parent 8a9027edd1
commit b576de5f05
2 changed files with 2 additions and 2 deletions

View File

@ -172,7 +172,7 @@ instance.web.Dialog = instance.web.Widget.extend({
$dialog_content.openerpClass();
this.$dialog_box.on('hidden.bs.modal', this, function() {
self.destroy();
self.close();
});
this.$dialog_box.modal('show');

View File

@ -410,7 +410,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
}
var widget = executor.widget();
if (executor.action.target === 'new') {
var pre_dialog = this.dialog;
var pre_dialog = (this.dialog && !this.dialog.isDestroyed()) ? this.dialog : null;
if (pre_dialog){
// prevent previous dialog to consider itself closed,
// right now, as we're opening a new one (prevents