diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py index 33a8d18d04f..85f32fc00cd 100644 --- a/addons/website/controllers/main.py +++ b/addons/website/controllers/main.py @@ -270,11 +270,11 @@ class Website(Home): } @http.route('/website/snippet/filters', type='json', auth='public', website=True) - def get_dynamic_filter(self, filter_id, template_key, limit=None, search_domain=None): + def get_dynamic_filter(self, filter_id, template_key, limit=None, search_domain=None, with_sample=False): dynamic_filter = request.env['website.snippet.filter'].sudo().search( [('id', '=', filter_id)] + request.website.website_domain() ) - return dynamic_filter and dynamic_filter.render(template_key, limit, search_domain) or '' + return dynamic_filter and dynamic_filter.render(template_key, limit, search_domain, with_sample) or '' @http.route('/website/snippet/options_filters', type='json', auth='user', website=True) def get_dynamic_snippet_filters(self): diff --git a/addons/website/data/website_data.xml b/addons/website/data/website_data.xml index a0252169ec4..0de6c2c2303 100644 --- a/addons/website/data/website_data.xml +++ b/addons/website/data/website_data.xml @@ -723,24 +723,26 @@