Files
odoo_source/addons
Denis Ledoux 58ea5e7b43 [IMP] http.py: do not inject context by default in JSON routes
Before this revision, when you pass `context` in the arguments
of a JSON routes, this one gets automatically injected
in the environment context.

This is not the case for regular HTTP routes.

It makes sense to propagate the context for the JSONRPC protocol,
JSON routes used by the backend, such as `call_kw`,
but it doesn't make sense to pass this context automatically
for any other kind of routes, such as front-end routes
or routes used by custom Javascript widgets.

This change brings a more unified behavior for routes
of types HTTP and JSON.
In addition, most developers were not aware of this "feautre",
that passing `context` in the arguments of a JSON route leaded
to the injection of this context in the environment context.
This is actually reflected by the diff size this changes required,
only a dozens of routes needed to be adapted, to manually
add the context in their route arguments and to inject it
in their environment context.

closes odoo/odoo#121726

X-original-commit: a7a5655631e6d5b05fd2ba3d0c80617aae6d9cfe
Related: odoo/enterprise#41229
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2023-05-22 11:43:04 +02:00
..
2023-05-12 22:59:22 +02:00
2023-05-12 22:59:14 +02:00
2023-05-17 10:34:00 +02:00
2023-05-17 10:34:00 +02:00
2023-05-12 22:59:22 +02:00
2023-05-11 18:25:38 +02:00
2023-05-12 22:59:22 +02:00
2023-05-17 16:48:30 +02:00
2023-05-12 09:21:49 +02:00
2023-05-17 10:34:00 +02:00
…
2023-05-17 10:34:00 +02:00