summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorFabien Meghazi <fme@openerp.com>2014-03-25 15:00:26 +0100
committerFabien Meghazi <fme@openerp.com>2014-03-25 15:00:26 +0100
commit329c19f94e173a370815df3c2e0a43df29982d92 (patch)
treec60381e3d185dec768f8ff714d17a1dfa5260bb1 /addons
parentc2e7a69ebaa378e290df64cd4d144669e24a602c (diff)
[FIX] Fix url slug check bug in multilang=True
bzr revid: fme@openerp.com-20140325140026-0qdx9zl21za8gto9
Diffstat (limited to 'addons')
-rw-r--r--addons/website/models/ir_http.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/addons/website/models/ir_http.py b/addons/website/models/ir_http.py
index 1833ce102db..c0a9e209d00 100644
--- a/addons/website/models/ir_http.py
+++ b/addons/website/models/ir_http.py
@@ -91,7 +91,12 @@ class ir_http(orm.AbstractModel):
assert path is not None
except Exception:
return self._handle_exception(werkzeug.exceptions.NotFound())
- if path != werkzeug.url_quote(request.httprequest.path):
+
+ generated_path = werkzeug.url_unquote_plus(path)
+ current_path = werkzeug.url_unquote_plus(request.httprequest.path)
+ if generated_path != current_path:
+ if request.lang != request.website.default_lang_code:
+ path = '/' + request.lang + path
return werkzeug.utils.redirect(path)
def _handle_exception(self, exception=None, code=500):