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