Skip to content
Snippets Groups Projects
Commit 64530065 authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] sale: apply record rules on order cancellation subject and body


When rendering the sale order cancellation message,
the rendering should apply the current user record rules,
for instance the count of the partner sale orders should
match the count of what the salesman can see in his ui.
Otherwise he doesn't understand why he has a different count
in the UI and in the cancellation message.

In case you want the behavior of seeing all records
and not just the current salesman records only,
then you apply within the template itself the
`sudo()`.

Applying the `sudo` where you actually need it in the template,
and not computing the full subject/body as sudo,
offers more granularity.

closes odoo/odoo#135127

Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
parent 4155743c
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment