Merge pull request #525 from xmo-odoo/master-fix-website-postprocess-xmo

Fix postprocessing of request arguments in website
This commit is contained in:
xmo-odoo 2014-06-17 15:55:55 +02:00
commit 0f72f6517d
1 changed files with 2 additions and 3 deletions

View File

@ -93,8 +93,7 @@ class ir_http(orm.AbstractModel):
return self._dispatch()
def _postprocess_args(self, arguments, rule):
if not getattr(request, 'website_enabled', False):
return super(ir_http, self)._postprocess_args(arguments, rule)
super(ir_http, self)._postprocess_args(arguments, rule)
for arg, val in arguments.items():
# Replace uid placeholder by the current request.uid
@ -106,7 +105,7 @@ class ir_http(orm.AbstractModel):
except Exception:
return self._handle_exception(werkzeug.exceptions.NotFound())
if request.httprequest.method in ('GET', 'HEAD'):
if getattr(request, 'website_multilang', False) and request.httprequest.method in ('GET', 'HEAD'):
generated_path = werkzeug.url_unquote_plus(path)
current_path = werkzeug.url_unquote_plus(request.httprequest.path)
if generated_path != current_path: