-
- Downloads
[FIX] base: keep evaluation context unchanged
Before this commit, the evaluation context was forced with sudo(False)
as the call to _render_qweb_html was made with sudo(True). The sudo
was removed to prevent rendering a report on any object.
This was problematic for reports such as sale.order portal page where
the public user does not have access to the record but uses a custom
verification mechanism using an access_token field and then calling
_render with sudo.
This commit moves the sudo call to keep the _get_evaluation_context
with the same environment and allow to call _render with sudo
Add tests with sale portal building the report as low-priviledge user
closes odoo/odoo#56806
Related: odoo/enterprise#12795
Signed-off-by:
Martin Trigaux (mat) <mat@odoo.com>
Please register or sign in to comment