From 5cecd0a197eba847e4a71bea3a31584d2b88ea6b Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Tue, 26 Jun 2018 10:43:12 +0200 Subject: [PATCH] [FIX] web_editor: restore website context for assets editor The assets editor controller was stripped of the website context with https://github.com/odoo/odoo/commit/198673bf35f14e3a797d2ff09208a289e12bec4e It was however needed by some client customizations. --- addons/web_editor/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py index c3f11def23b..3a156f69be7 100644 --- a/addons/web_editor/controllers/main.py +++ b/addons/web_editor/controllers/main.py @@ -244,7 +244,7 @@ class Web_Editor(http.Controller): ## @param bundles - True if the bundles views must be fetched (default to False) ## @param bundles_restriction - Names of the bundle in which to look for less files (if empty, search in all of them) ## @returns a dictionary with views info in the views key and style info in the less key - @http.route("/web_editor/get_assets_editor_resources", type="json", auth="user") + @http.route("/web_editor/get_assets_editor_resources", type="json", auth="user", website=True) def get_assets_editor_resources(self, key, get_views=True, get_less=True, bundles=False, bundles_restriction=[]): # Related views must be fetched if the user wants the views and/or the style views = request.env["ir.ui.view"].get_related_views(key, bundles=bundles)