summaryrefslogtreecommitdiff
path: root/addons/website/static
diff options
context:
space:
mode:
authorBenoit Socias <bso@odoo.com>2020-10-05 12:05:59 +0000
committerBenoit Socias <bso@odoo.com>2020-10-13 13:00:21 +0000
commit19d82ca5a85c2740aeced9052ace6a6799695b2c (patch)
tree8b4010f8c2670aeb23d5b969b262c08788a0c2fc /addons/website/static
parent3563738ca5dd97791d5f32d8ffc40d07a8a95386 (diff)
[FIX] website: filter filter_opt of dynamic snippet by website_id
Add a filtering by the contextual website_id when looking up available website_snippet_filters via an rpc route limited to logged in users but relying on a sudo to actually obtain the list of available filters. Before this commit filters were visible on the editor for all websites. After this commit filters are only visible on the editor of the website that matches their website_id. https://github.com/odoo/odoo/pull/59341 task-2312878 closes odoo/odoo#59341 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/website/static')
-rw-r--r--addons/website/static/src/snippets/s_dynamic_snippet/options.js9
1 files changed, 1 insertions, 8 deletions
diff --git a/addons/website/static/src/snippets/s_dynamic_snippet/options.js b/addons/website/static/src/snippets/s_dynamic_snippet/options.js
index 4c713703eb9..a39b62c2005 100644
--- a/addons/website/static/src/snippets/s_dynamic_snippet/options.js
+++ b/addons/website/static/src/snippets/s_dynamic_snippet/options.js
@@ -47,14 +47,7 @@ const dynamicSnippetOptions = options.Class.extend({
* @returns {Promise}
*/
_fetchDynamicFilters: function () {
- return this._rpc({
- model: 'website.snippet.filter',
- method: 'search_read',
- kwargs: {
- domain: [],
- fields: ['id', 'name', 'limit'],
- }
- });
+ return this._rpc({route: '/website/snippet/options_filters'});
},
/**
* Fetch dynamic filters templates.