You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

146 lines
4.6 KiB

  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  2. :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
  3. :alt: License: AGPL-3
  4. =========================
  5. Mail digest notifications
  6. =========================
  7. Features
  8. --------
  9. This module allows users/partners to:
  10. * enable "digest mode" in their notification settings
  11. * with digest mode on select a frequency: "daily" or "weekly"
  12. * configure specific rules per message subtype (enabled/disabled)
  13. * globally enable/disable digest based on message's type
  14. to receive or to not receive any email notification for a given subtype.
  15. The preference tab on user's form will look like:
  16. .. image:: ./images/preview.png
  17. Global settings
  18. ---------------
  19. By default digest functionality is enabled
  20. for every message type ('email', 'comment', 'notification').
  21. You change this with the config param `mail_digest.enabled_message_types`
  22. whereas you can specify message types separated by comma.
  23. Behavior
  24. --------
  25. When a user with digest mode on is notified with a message or an email
  26. all the messages are collected inside a `mail.digest` container.
  27. A daily cron and a weekly cron will take care
  28. of creating a single email per each digest,
  29. which will be sent as a standard email.
  30. **Rules**
  31. Given that the user has `Notification management = Handle by Emails`...
  32. a message with subtype assigned **will be sent** via digest if:
  33. * global: `mail_digest_enabled_message_types` param enables the message type
  34. * user: digest mode is ON for the recipient
  35. * user: recipient's user has no specific setting for the subtype
  36. * user: recipient's user has no specific disabling setting for the subtype
  37. a message with subtype assigned **will NOT be sent** via digest if:
  38. * global: `mail_digest_enabled_message_types` param disables the message type
  39. * user: digest mode is OFF for the recipient
  40. * user: recipient's user has disabled the subtype in her/his settings
  41. NOTE: under the hood the digest notification logic excludes followers to be notified,
  42. since you really want to notify only mail.digest's partner.
  43. NOTE 2: Odoo's mail machinery has an option `force_send`
  44. to send the email immediately without waiting for the mail queue to be processed.
  45. When this option is used the email is sent right away
  46. and the message record is deleted right after.
  47. A typical use case is the reset password mail.
  48. We assume that if you use that option you really want the email to go out "now"
  49. so when `force_send` is used, digest machinery is completely bypassed.
  50. Digest rendering preview
  51. ------------------------
  52. You can check how messages are formatted per each mail subtype by going to `/digest/layout-preview` in your browser.
  53. .. image:: ./images/digest_layout_preview.png
  54. Known issues / Roadmap
  55. ======================
  56. * take full control of message and email template.
  57. Right now the notification message and the digest mail itself is wrapped inside Odoo mail template.
  58. We should be able to customize this easily.
  59. Migrating to v11
  60. ----------------
  61. Notification settings, in Odoo core,
  62. `have been moved to user model <https://github.com/odoo/odoo/commit/2950ffaa86ef38263e9a4a59a30d0768f82a61fa#diff-0c15808786b030dc6c62b0b88196afff>`,
  63. and the logic changed a bit.
  64. At the moment there's no staight upgrade provided by this module.
  65. If you need to migrate, keep in mind that:
  66. * `mail.digest` is now tied to user (partner_id -> user_id)
  67. * `notify_email` has been removed so to enable digest mode you have to turn on the new flag `digest_mode`
  68. * `notify_frequency` has been moved to user model and is now called `digest_frequency`
  69. * `partner.notification.conf` became `user.notification.conf`
  70. * `notify_conf_ids` now links the new model `user.notification.conf` and moved to user model
  71. Bug Tracker
  72. ===========
  73. Bugs are tracked on `GitHub Issues
  74. <https://github.com/OCA/social/issues>`_. In case of trouble, please
  75. check there if your issue has already been reported. If you spotted it first,
  76. help us smash it by providing a detailed and welcomed feedback.
  77. Credits
  78. =======
  79. Contributors
  80. ------------
  81. * Simone Orsi <simone.orsi@camptocamp.com>
  82. Funders
  83. -------
  84. The development of this module has been financially supported by: `Fluxdock.io <https://fluxdock.io>`_
  85. Maintainer
  86. ----------
  87. .. image:: https://odoo-community.org/logo.png
  88. :alt: Odoo Community Association
  89. :target: https://odoo-community.org
  90. This module is maintained by the OCA.
  91. OCA, or the Odoo Community Association, is a nonprofit organization whose
  92. mission is to support the collaborative development of Odoo features and
  93. promote its widespread use.
  94. To contribute to this module, please visit https://odoo-community.org.