diff options
| author | Romain Derie <rde@odoo.com> | 2019-05-07 13:27:02 +0000 |
|---|---|---|
| committer | Romain Derie <rde@odoo.com> | 2019-06-12 14:02:34 +0000 |
| commit | 55e7b702bb7f01c5f3bd3efbccf82c2d2c661f49 (patch) | |
| tree | 3d784f878a03737d4d86e9c1caca23af4d2c0e9c /odoo/addons/base/models/assetsbundle.py | |
| parent | 283313a06cebace1588cb9ad8c54fc135070a204 (diff) | |
[REM] base, website: remove deprecated code from qweb and bundle
The _get_asset method was deprecated since df4072b0b493
Last use of this deprecated method was removed with d7da1d648c2d6
Also, remains and to_html were deprecated since 9cd982bcc81
test_assetsbundle was still using the deprecated method to test..
Closes #33432
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Diffstat (limited to 'odoo/addons/base/models/assetsbundle.py')
| -rw-r--r-- | odoo/addons/base/models/assetsbundle.py | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/odoo/addons/base/models/assetsbundle.py b/odoo/addons/base/models/assetsbundle.py index 4afc9a76a56..043d4999c23 100644 --- a/odoo/addons/base/models/assetsbundle.py +++ b/odoo/addons/base/models/assetsbundle.py @@ -86,8 +86,7 @@ class AssetsBundle(object): rx_preprocess_imports = re.compile("""(@import\s?['"]([^'"]+)['"](;?))""") rx_css_split = re.compile("\/\*\! ([a-f0-9-]+) \*\/") - # remains attribute is depreciated and will remove after v11 - def __init__(self, name, files, remains=None, env=None): + def __init__(self, name, files, env=None): self.name = name self.env = request.env if env is None else env self.javascripts = [] @@ -110,26 +109,6 @@ class AssetsBundle(object): elif f['atype'] == 'text/javascript': self.javascripts.append(JavascriptAsset(self, url=f['url'], filename=f['filename'], inline=f['content'])) - # depreciated and will remove after v11 - def to_html(self, sep=None, css=True, js=True, debug=False, async_load=False, defer_load=False, lazy_load=False, url_for=(lambda url: url)): - nodes = self.to_node(css=css, js=js, debug=debug, async_load=async_load, defer_load=defer_load, lazy_load=lazy_load) - - if sep is None: - sep = u'\n ' - response = [] - for tagName, attributes, content in nodes: - html = u"<%s " % tagName - for name, value in attributes.items(): - if value or isinstance(value, str): - html += u' %s="%s"' % (name, escape(to_text(value))) - if content is None: - html += u'/>' - else: - html += u'>%s</%s>' % (escape(to_text(content)), tagName) - response.append(html) - - return sep + sep.join(response) - def to_node(self, css=True, js=True, debug=False, async_load=False, defer_load=False, lazy_load=False): """ :returns [(tagName, attributes, content)] if the tag is auto close @@ -599,19 +578,6 @@ class WebAsset(object): except Exception: raise AssetNotFound("Could not find %s" % self.name) - # depreciated and will remove after v11 - def to_html(self): - tagName, attributes, content = self.to_node() - html = u"<%s " % tagName - for name, value in attributes.items(): - if value or isinstance(value, str): - html += u' %s="%s"' % (name, escape(to_text(value))) - if content is None: - html += u'/>' - else: - html += u'>%s</%s>' % (escape(to_text(content)), tagName) - return html - def to_node(self): raise NotImplementedError() |
