-
- Downloads
[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:
Denis Ledoux (dle) <dle@odoo.com>
Showing
- addons/mail/models/mail_composer_mixin.py 2 additions, 2 deletionsaddons/mail/models/mail_composer_mixin.py
- addons/sale/tests/__init__.py 1 addition, 0 deletionsaddons/sale/tests/__init__.py
- addons/sale/tests/test_sale_order_cancel.py 46 additions, 0 deletionsaddons/sale/tests/test_sale_order_cancel.py
- addons/sale/wizard/sale_order_cancel.py 2 additions, 2 deletionsaddons/sale/wizard/sale_order_cancel.py
Loading
Please register or sign in to comment