There's more...

All methods (message_post, message_post_with_template, and message_post_with_view) respect the user's preference. If the user changes the notification-management option from the user preference, the user will not receive emails; instead they will receive notifications in Odoo's UI. This is the same for customers; if a customer opts out of emails, they will not receive any updates through email.

Additionally, the Odoo message thread follows a concept called subtypes. Subtypes are used to receive emails only for information you are interested in. You can pass an extra parameter, subtype_id, in message_post_* methods to send emails based on the subtype. Usually, the user will manage their subtypes from the dropdown of the Follow button. Let's suppose the user has set their subtypes as follows:

Based on the user's preference, the user will only get emails for Discussions messages.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset