[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>
This commit is contained in:
Aaron Bohy
2020-01-21 11:59:22 +00:00
parent 7ab364b627
commit 37462d8a11
@@ -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) {