diff options
Diffstat (limited to 'addons/web_editor/controllers/main.py')
| -rw-r--r-- | addons/web_editor/controllers/main.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py index 5c7b5316d44..d6d39817d7f 100644 --- a/addons/web_editor/controllers/main.py +++ b/addons/web_editor/controllers/main.py @@ -271,6 +271,9 @@ class Web_Editor(http.Controller): result['originalSrc'] = record.url return result + def _get_view_fields_to_read(self): + return ['name', 'id', 'key', 'xml_id', 'arch', 'active', 'inherit_id'] + ## The get_assets_editor_resources route is in charge of transmitting the resources the assets ## editor needs to work. ## @param key - the xml_id or id of the view the resources are related to @@ -283,7 +286,7 @@ class Web_Editor(http.Controller): def get_assets_editor_resources(self, key, get_views=True, get_scss=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) - views = views.read(['name', 'id', 'key', 'xml_id', 'arch', 'active', 'inherit_id']) + views = views.read(self._get_view_fields_to_read()) scss_files_data_by_bundle = [] |
