summaryrefslogtreecommitdiff
path: root/addons/website/models/ir_qweb.py
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2019-03-25 10:48:10 +0000
committerNicolas Lempereur <nle@odoo.com>2019-03-25 10:53:25 +0000
commit2a89f0c7f8a9d8f95036cd5062b15efc702e5e51 (patch)
tree1af18b6077ce030c93a091f1f2c2f86ad482282d /addons/website/models/ir_qweb.py
parentd3bd48d67baeda427c869c53cea1a1715670120c (diff)
[REV] "[FIX] website: language prefixed URL on website"
This reverts commit 5324284f560dd15ef949dab3b00d238a3bfa2b5e This reverts commit ad826f56ba49caba0881a40609083cf73250d610. If for example we had in a template: <script type="text/javascript" src="/payment_stripe/static/src/js/stripe.js"></script> it has been reproduced to be gotten as: <script type="text/javascript" src="/de_DE/payment_stripe/static/src/js/stripe.js"></script> which is unexpected and could cause an error. closes #32090 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/website/models/ir_qweb.py')
-rw-r--r--addons/website/models/ir_qweb.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/addons/website/models/ir_qweb.py b/addons/website/models/ir_qweb.py
index 3c082964ddc..0f73bc469f5 100644
--- a/addons/website/models/ir_qweb.py
+++ b/addons/website/models/ir_qweb.py
@@ -6,7 +6,6 @@ from collections import OrderedDict
from odoo import models
from odoo.http import request
-from odoo.addons.http_routing.models.ir_http import url_for
re_background_image = re.compile(r"(background-image\s*:\s*url\(\s*['\"]?\s*)([^)'\"]+)")
@@ -38,16 +37,10 @@ class QWeb(models.AbstractModel):
if not website and options.get('website_id'):
website = self.env['website'].browse(options['website_id'])
- if not website:
+ if not website or not website.cdn_activated:
return atts
name = self.URL_ATTRS.get(tagName)
- if request and name and name in atts:
- atts[name] = url_for(atts[name])
-
- if not website.cdn_activated:
- return atts
-
if name and name in atts:
atts = OrderedDict(atts)
atts[name] = website.get_cdn_url(atts[name])