[FIX] website: website.redirect keep params during redirect
Before this commit if /foo redirect to /bar?a=1 /foo?debug=1 was redirectd to /bar?a=1 After this commit, /foo?debug=1 is redirected to /bar?a=1&debug=1
This commit is contained in:
@@ -20,6 +20,7 @@ from odoo.tools.safe_eval import safe_eval
|
||||
from odoo.osv.expression import FALSE_DOMAIN
|
||||
|
||||
from odoo.addons.http_routing.models.ir_http import ModelConverter, _guess_mimetype
|
||||
from odoo.addons.portal.controllers.portal import _build_url_w_params
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -145,7 +146,7 @@ class Http(models.AbstractModel):
|
||||
|
||||
redirect = cls._serve_redirect()
|
||||
if redirect:
|
||||
return request.redirect(redirect.url_to, code=redirect.type)
|
||||
return request.redirect(_build_url_w_params(redirect.url_to, request.params), code=redirect.type)
|
||||
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user