diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py index 83320fef24f..8360161fb3d 100644 --- a/addons/web_editor/controllers/main.py +++ b/addons/web_editor/controllers/main.py @@ -326,7 +326,7 @@ class Web_Editor(http.Controller): """ # 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(request.env['web_editor.assets'].get_view_fields_to_read()) + views = views.read(['name', 'id', 'key', 'xml_id', 'arch', 'active', 'inherit_id']) scss_files_data_by_bundle = [] js_files_data_by_bundle = [] diff --git a/addons/web_editor/models/assets.py b/addons/web_editor/models/assets.py index 9406fc495b2..72b1b557e90 100644 --- a/addons/web_editor/models/assets.py +++ b/addons/web_editor/models/assets.py @@ -18,9 +18,6 @@ class Assets(models.AbstractModel): _name = 'web_editor.assets' _description = 'Assets Utils' - def get_view_fields_to_read(self): - return ['name', 'id', 'key', 'xml_id', 'arch', 'active', 'inherit_id'] - def get_all_custom_attachments(self, urls): """ Fetch all the ir.attachment records related to given URLs. diff --git a/addons/website/models/assets.py b/addons/website/models/assets.py index 0d2be3d2b91..c2a52588eaa 100644 --- a/addons/website/models/assets.py +++ b/addons/website/models/assets.py @@ -7,11 +7,6 @@ from odoo import models class Assets(models.AbstractModel): _inherit = 'web_editor.assets' - def get_view_fields_to_read(self): - res = super(Assets, self).get_view_fields_to_read() - res.append('website_id') - return res - def _get_custom_attachment(self, custom_url, op='='): """ See web_editor.Assets._get_custom_attachment