From 37462d8a1175151cc07a921600d4f736af3acb80 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Tue, 21 Jan 2020 11:17:00 +0000 Subject: [PATCH] [FIX] sale_product_configurator: display multiple dialogs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .../static/src/js/product_configurator_modal.js | 4 ++++ 1 file changed, 4 insertions(+) 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) {