[REF] website_sale_comparison: adapt code after jQuery update

Part of task 1896658

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
Co-authored-by: svs-odoo <svs@odoo.com>
Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
This commit is contained in:
Vincent Schippefilt
2019-03-06 20:07:17 +01:00
committed by Aaron Bohy
co-authored by Aaron Bohy Christophe Matthieu Mathieu Duckerts-Antoine David Monjoie Martin Geubelle svs-odoo
parent d093d1aeba
commit 4032be506a
@@ -95,14 +95,12 @@ var ProductComparison = publicWidget.Widget.extend(ProductConfiguratorMixin, {
}
}
var productReady = this.selectOrCreateProduct(
this.selectOrCreateProduct(
$elem.closest('form'),
productId,
$elem.closest('form').find('.product_template_id').val(),
false
);
productReady.done(function (productId) {
).then(function (productId) {
productId = parseInt(productId, 10);
if (!productId) {
@@ -247,7 +245,7 @@ publicWidget.registry.ProductComparison = publicWidget.Widget.extend({
start: function () {
var def = this._super.apply(this, arguments);
this.productComparison = new ProductComparison(this);
return $.when(def, this.productComparison.appendTo(this.$el));
return Promise.all([def, this.productComparison.appendTo(this.$el)]);
},
//--------------------------------------------------------------------------