mirror of
https://github.com/odoo/design-themes.git
synced 2025-10-07 01:18:52 +07:00
[REF] core: HTTPocalypse
Comprehensive refactor of the HTTP framework. Discussions, rationnals and changes are found on GitHub. closes odoo/design-themes#524 Pr: odoo/odoo#78857 Task: 2571224 Related: odoo/enterprise#21849 Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
@@ -9,10 +9,10 @@ class Http(models.AbstractModel):
|
||||
_inherit = 'ir.http'
|
||||
|
||||
@classmethod
|
||||
def _add_dispatch_parameters(cls, func):
|
||||
def _frontend_pre_dispatch(cls):
|
||||
# Allow public user to use `fw` query string in test mode to ease tests
|
||||
force_website_id = request.httprequest.args.get('fw')
|
||||
if (request.registry.in_test_mode() or tools.config.options['test_enable']) and force_website_id:
|
||||
request.env['website']._force_website(force_website_id)
|
||||
|
||||
super(Http, cls)._add_dispatch_parameters(func)
|
||||
super(Http, cls)._frontend_pre_dispatch()
|
||||
|
||||
Reference in New Issue
Block a user