Files
odoo_source/addons/test_mail
helly kapatelandjpr-odoo 7f0ebad5cc [FIX] mail: fix issue when posting a message on a document whose first message / parent is not readable
How to reproduce
================

Have a portal user commenting a task on the customer portal. He may experience
a crash if previous message / first message is not available, for example
if it is internal or not published.

This is due to reference computation used in outgoing emails as it is based
on parent messageID. Accessing it crashes although it should not as it is
used only for technical purpose.

Fix
===

In this comme we fix that issue by browsing the reference message as sudo
to access its messageID. A test is added to avoid regressions.

Task ID 2061760
PR #36845

closes odoo/odoo#44765

X-original-commit: e94349ed65e05a40af6e690e366de81fc5aa6725
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Co-authored-by: jpr-odoo <jpr@openerp.com>
2020-02-06 16:57:41 +00:00
..
…