Metadata-Version: 2.1
Name: odoo-addon-mail_force_email_notification
Version: 18.0.1.0.0.4
Requires-Python: >=3.10
Requires-Dist: odoo==18.0.*
Summary: Context key to define notifications to be sent by emaildefined by force_notification_by_email context key
Home-page: https://github.com/OCA/mail
License: AGPL-3
Author: Camptocamp, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 18.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3

=============================
Mail Force Email Notification
=============================

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:bc735d617f6e55d39427e192b0b118b534714ab642d16ffc1e71aa6e19394f8d
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
    :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
    :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmail-lightgray.png?logo=github
    :target: https://github.com/OCA/mail/tree/18.0/mail_force_email_notification
    :alt: OCA/mail
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/mail-18-0/mail-18-0-mail_force_email_notification
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/mail&target_branch=18.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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**

.. contents::
   :local:

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

   .. code:: python

      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 <https://github.com/OCA/mail/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 <https://github.com/OCA/mail/issues/new?body=module:%20mail_force_email_notification%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Camptocamp

Contributors
------------

- `Camptocamp <https://www.camptocamp.com>`__

     - Rafael Lima <rafael.lima@camptocamp.com>

Other credits
-------------

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

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

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 <https://github.com/OCA/mail/tree/18.0/mail_force_email_notification>`_ project on GitHub.

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