diff options
| author | qsm-odoo <qsm@odoo.com> | 2019-02-15 11:03:16 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2019-02-15 11:15:37 +0000 |
| commit | bd2624a7bacb3e7fced2f0bced903e623630543c (patch) | |
| tree | 96aefb68843725eab2c817d50ea6407c4c629d43 | |
| parent | ff9be5930953ebf05bf2aa6fc5d2e3a23977cce9 (diff) | |
[REF] web_editor, website: remove useless code
Commit https://github.com/odoo/odoo/commit/29075a8e2c734624cec4f6009185616634f70dea
introduced some python methods which became useless with commit
https://github.com/odoo/odoo/commit/aef6a5aaed22b250799ce92b5021d240fed9e12e
They were not removed with that commit since it was a stable version and
because it would have made forward-port difficult because of master
tasks. Now that those tasks are merged, this commit removes the useless
methods.
| -rw-r--r-- | addons/web_editor/controllers/main.py | 2 | ||||
| -rw-r--r-- | addons/web_editor/models/assets.py | 3 | ||||
| -rw-r--r-- | addons/website/models/assets.py | 5 |
3 files changed, 1 insertions, 9 deletions
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 |
