[FIX] website_sale: fix traceback when unselecting attribute
This commit fixes a traceback when changing the attributes when the current page has no products to display TaskId-3045085 closes odoo/odoo#105515 X-original-commit: b8a1b1143eec4a85b9dc8b2c6fbb0112f6b813d7 Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit is contained in:
@@ -737,7 +737,10 @@ publicWidget.registry.WebsiteSale = publicWidget.Widget.extend(VariantMixin, car
|
||||
_onChangeAttribute: function (ev) {
|
||||
if (!ev.isDefaultPrevented()) {
|
||||
ev.preventDefault();
|
||||
this.el.querySelector('.o_wsale_products_grid_table_wrapper').classList.add('opacity-50');
|
||||
const productGrid = this.el.querySelector(".o_wsale_products_grid_table_wrapper");
|
||||
if (productGrid) {
|
||||
productGrid.classList.add("opacity-50");
|
||||
}
|
||||
$(ev.currentTarget).closest("form").submit();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user