This module extends the functionality of Odoo's mail notification system to allow forcing email notifications through context keys. By default, Odoo sends internal notifications to connected users and email notifications to external partners or disconnected users.
With this module, you can override this behavior by setting the force_notification_by_email context key, ensuring specific notifications are always sent by email regardless of the user's connection status or notification preferences. This is particularly useful when you need to maintain an email trail for certain communications or ensure critical notifications are delivered via email.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0This module lets Odoo force certain messages to be sent by email instead of as in-app notifications, by using a special context setting. It is a technical helper with no new screens or menus.
This is a small technical module that changes how Odoo decides to deliver messages. Normally, Odoo sends a notification inside Odoo to users who are connected, and an email to partners who are external or offline. With this module, when the special setting force_notification_by_email is active in the context, every recipient of the message is switched to email delivery.
The change is applied in the mail.thread model, which is the shared messaging engine used by many Odoo documents such as sales orders, invoices, projects and tasks. The module overrides the method that builds the recipient list (_notify_get_recipients) and, when the setting is present, marks each recipient with the notification mode email.
Because it works through the context, it does not add any menu, button, report or configuration screen. It is meant to be used by other modules or custom code that need to guarantee an email trail for specific communications, for example critical alerts or messages that must be archived in an inbox. There are no new models, no scheduled actions, no automatic checks and no user-facing settings in this module.
Depends on
Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 1 confirmed, 8 with no information of 9 versions.
Sources · Odoo 18.0
Confirmed on 2026-11-03 in branch 18.0 of OCA/mail.
terminal Installation and usage
OCA documentation · Odoo 18.0Usage
Source · Odoo 18.0To use this module, you need to:
- For developers implementing the feature:
- Add the context key
force_notification_by_email=Truewhen sending messages through the mail thread
self.env['mail.thread'].with_context(
force_notification_by_email=True
).message_post(
body="Your message",
partner_ids=[partner.id],
)- For end users:
- No specific configuration is needed
- When developers have implemented the feature in specific actions:
- Messages will be sent by email regardless of your notification preferences
- You will receive email notifications even if you are connected to Odoo
- Your notification preferences in your user settings won't affect these specific notifications
Example Use Cases:
- Critical notifications that need email documentation
- Automated workflows where email trail is required
- Compliance requirements where email proof of communication is necessary
Note: This module only affects notifications where the context key has been specifically implemented. All other notifications will follow standard Odoo behavior.
No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.