[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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user