Commit Graph
2 Commits
Author SHA1 Message Date
Thibault Delavallée 9c25a65fa2 [FW][FIX] digest: use email queue to send digest emails (and improve tests)
When there is an issue updating digest state (concurrent access, or some other
error that may happen), digest emails may be sent in loop. Indeed they are
currently sent in the same transaction that the one that updates digest state.
This means that emails may be sent even if digest update fails.

As we do not think timing is so important, we now use the email queue to send
digest emails. That way email creation is rollbacked and they are not sent
if digest update fails for some reason.

Tests are updated to take into account we now create outgoing mail.mail. Some
tests are also added about mail values and subscription, and cleaned in a more
general way.

Task-2641394 (Digest emails sending improvement)
Task-2582128 (Digest onbarding and usage improvement)

X-original-commit: 96a14816cb48d9324482eec3de0ed3fccc0d7ecf
Part-of: odoo/odoo#79877
2021-11-16 16:58:37 +00:00
Xavier Morel c56e8c9f5a [FIX] digest: de-t-raw-ify
* fix generation of preferences markup so everything's properly
  safe (and flag as markup)
* tips should be the result of templates rendering and thus safe
* same for body
2021-04-29 05:34:20 +00:00