summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2020-01-21 11:17:00 +0000
committerAaron Bohy <aab@odoo.com>2020-01-21 11:59:22 +0000
commit37462d8a1175151cc07a921600d4f736af3acb80 (patch)
treeafce4485f42e59143cb18dbeb58899510f188686
parent7ab364b6277a7195aa6279a3e517200a2bf84716 (diff)
[FIX] sale_product_configurator: display multiple dialogs
Create a new quotation, add a row with product Customizable desk. The product configurator dialog opens. Click on 'Add'. A second dialog opens (to select optional products). Before this commit, the second dialog was displayed behind the first one. This bug is present since the introduction of Owl dialogs (34bbdd8). It is due to an override of the 'open' function that doesn't call _super (and thus, doesn't go through the code that makes the last opened dialog active). closes odoo/odoo#43424 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
-rw-r--r--addons/sale_product_configurator/static/src/js/product_configurator_modal.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/sale_product_configurator/static/src/js/product_configurator_modal.js b/addons/sale_product_configurator/static/src/js/product_configurator_modal.js
index 5f57e0b3d44..0be980b9ac0 100644
--- a/addons/sale_product_configurator/static/src/js/product_configurator_modal.js
+++ b/addons/sale_product_configurator/static/src/js/product_configurator_modal.js
@@ -3,6 +3,7 @@ odoo.define('sale_product_configurator.OptionalProductsModal', function (require
var ajax = require('web.ajax');
var Dialog = require('web.Dialog');
+const OwlDialog = require('web.OwlDialog');
var ServicesMixin = require('web.ServicesMixin');
var VariantMixin = require('sale.VariantMixin');
@@ -118,6 +119,9 @@ var OptionalProductsModal = Dialog.extend(ServicesMixin, VariantMixin, {
self.$modal.modal().appendTo(self.container);
self.$modal.focus();
self._openedResolver();
+
+ // Notifies OwlDialog to adjust focus/active properties on owl dialogs
+ OwlDialog.display(self);
}
});
if (options && options.shouldFocusButtons) {