Skip to main content

Context key to define notifications to be sent by emaildefined by force_notification_by_email context key

Project description

Beta License: AGPL-3 OCA/mail Translate me on Weblate Try me on Runboat

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.

Table of contents

Usage

To use this module, you need to:

  1. For developers implementing the feature:

    • Add the context key force_notification_by_email=True when 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],
    )
  2. 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.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Camptocamp

Contributors

Other credits

The development of this module has been financially supported by Camptocamp.

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

This module is part of the OCA/mail project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file odoo_addon_mail_force_email_notification-18.0.1.0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_addon_mail_force_email_notification-18.0.1.0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 da501ef90c34edb70600e521f5f1687cd400b9011314cba90e6884bb681097c6
MD5 fd3de28e2011f24a0f7c8f3264157ed5
BLAKE2b-256 ecbc37ea4c8703f2c2332ebbead043bbd547127c59394f87bf1ece4f6679cfe7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page