Skip to content
Snippets Groups Projects
Commit 9359be0d authored by Jeremy Kersten's avatar Jeremy Kersten
Browse files

[FIX] website_sale: don't crash if website.filter.snippet has been deleted


Meanwhile another fix to make these filter more compliant in multi website.
For now, if you delete website 1 (and filter by cascade) and create website 2
and try to drop a caroussel product, it will crash because no filter exists.

closes odoo/odoo#62097

Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
parent e18c43d2
Branches
Tags
No related merge requests found
......@@ -28,8 +28,10 @@ const dynamicSnippetProductsOptions = s_dynamic_snippet_carousel_options.extend(
fields: ['id', 'res_id'],
}
}).then((data) => {
this.$target.get(0).dataset.filterId = data[0].res_id;
this.$target.get(0).dataset.numberOfRecords = this.dynamicFilters[data[0].res_id].limit;
if (data) {
this.$target.get(0).dataset.filterId = data[0].res_id;
this.$target.get(0).dataset.numberOfRecords = this.dynamicFilters[data[0].res_id].limit;
}
});
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment