From 2c6fab231cfbba4985bf3aa007c455d9c6e351f3 Mon Sep 17 00:00:00 2001 From: "Touati Djamel (otd)" Date: Tue, 23 Nov 2021 16:05:10 +0000 Subject: [PATCH] [FIX] sale_product_configurator: stop hiding subsequent dialogs after configuration step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Steps to reproduce the bug: - install `”sale_product_configurator”` - Go to the sales settings and enable the “Warnings” option - Create a product with variants - Add sale warning - Create a SO and add the product Problem: The warning message is not appearing Solution: The product configurator does not need to hide modals after the product is added. This fix ensures that any modals displayed after adding the product (such as warnings, messages, etc.) are correctly displayed and not hidden. opw-2696002 opw-2679495 closes odoo/odoo#80331 X-original-commit: e82230fd395fa71081dc94ffefc39b51ad258382 Signed-off-by: Djamel Touati (otd) --- .../static/src/js/product_configurator_controller.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/addons/sale_product_configurator/static/src/js/product_configurator_controller.js b/addons/sale_product_configurator/static/src/js/product_configurator_controller.js index 6346adeba18..18647503c9d 100644 --- a/addons/sale_product_configurator/static/src/js/product_configurator_controller.js +++ b/addons/sale_product_configurator/static/src/js/product_configurator_controller.js @@ -258,6 +258,16 @@ var ProductConfiguratorFormController = FormController.extend({ } }, + /** + * Remove "d-none" to allow other modals to display + * + * @override + */ + destroy: function () { + $('.o_dialog_container').removeClass('d-none'); + this._super.apply(this, arguments); + }, + /** * Update product configurator form * when quantity is updated in the optional products window