Files
odoo_source/addons/mail/controllers
Thibault Delavallée 313c5c10cd [FIX] mail: do not crash when redirecting to non thread records
'_redirect_to_record' is used notably when accessing 'mail/view' controller
used notably with email notifications ('See Document' link). In order to
try to avoid multi company issues a call to '_get_mail_redirect_suggested_company'
is performed in order to find the record's preferred company.

However it is defined on 'mail.thread' which means the redirect crashes if
invoked using a non thread record. This is quite rare but may happen with
models using a mailgateway implementation similar to 'mail.thread' without
inheriting from the mixin (see 'mail.group' model added in Odoo 16).

This limitation is present since a long time but is now more present since
odoo/odoo@f4523fcd92 .

Task-3689459

closes odoo/odoo#150309

X-original-commit: 9a366dcdb789d0f160871ee4d29a463e2641ca26
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2024-01-21 14:35:30 +00:00
..
…