[FIX] web: revert c1d48362d3a38606ffb99d569fdc6147dcd0c775 and consider there is...
[odoo/odoo.git] / addons / web / static / src / js / views.js
index e62928f..739a36d 100644 (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