[FIX] website_sale_wishlist: improve product page loading time

When the product has a lot of variants which are displayed as checkboxes
or as colors, the jQuery selector was matching as many items, and the
event was triggered for each of them.
The result was the change event of website_sale being triggered many
times, where only one call would be enough.

The change replicates what was made on v12.0 on the same line by commit
f8dad1bb4b.

opw 2036356

closes odoo/odoo#35322

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit is contained in:
Paul Morelle
2019-07-31 09:22:16 +00:00
parent 7e889a1bd5
commit 568a7ee12d
@@ -69,7 +69,7 @@ var ProductWishlist = Widget.extend({
$('input.js_product_change:checked').first().trigger('change');
}
else {
$('input.js_variant_change').trigger('change');
$('input.js_variant_change:checked').first().trigger('change');
}
});