odoo/odoo#194618
Created by fw-bot
Closed
- label
- odoo-dev:saas-18.1-18.0-mail-fix-error-when-sending-mail-notifications-with-no-author-jbn-Aw9y-fw
- head
- 8865e062116d472f9bf9a9c8c3999795d30c4df4
odoo/odoo | |
---|---|
18.0 | #194569 |
saas-18.1 | #194618 |
[FW][FIX] mail: fix error when sending mail notifications with no author
There are instances where an email notification may not have an associated author. In the mail notification template, we forgot to check that the author exists before calling the _is_internal
on it. When the author is False
, the function generating the mail crashes as the _is_internal
function is undefined on a boolean variable.
To address this issue, we will ensure the existence of the author before invoking any methods defined in the res.users
model. This solution prevents errors and ensures the email template functions correctly.
see: #190390
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: #194569