The following changes were implemented:
1 - Added Failed Message component and related components to reuse the
Message component when rendering failed messages. This allows us to
dispose of the messagefailed JS model altogether, since failed messages
are now just regular messages that were marked as failed.
2 - Added Owl reactivity to failed message actions so that browser does
not have to be reloaded each time a message is marked as reviewed or
resent.
3 - Fixed 'Retry' and 'Set as reviewed' flows for failed messages.
4 - Fixed `Failed sent messages` filter on models by overriding `get_view`
instead of `_fields_view_get`
5 - Refactored folder structure to more closely resemble the `mail`
module's folder structure.
6 - Refactored module to utilize `Command` as a means to create, write,
etc. instead of `[0, ...]`, `[4, ...]`.
7 - Fixed and added unit tests.
8 - Removed dead/unused code from `v15`.
In the forward port of the permission check, a column was dropped from
the tuple, but the following code wasn't adapted to the new tuple
length. For clarity sake we also name the tuple unpacking into proper
variables.
TT43453
Refine which mail tracking record is allowed to see. We can rely on the
ACLs of the related records so we minimize inconvenient message subject
leaks.
A regular user can read these mail.tracking.email records:
- Those with a linked mail.message that the user can read
- Those with a linked mail.mail that the user can read
- Those with no message/mail link but a linked partner that the user can
read.
- Those with no linked records.
TT31399
Up until now, the `sent` event type was never processed, probably because it "made no sense", as an unsent email would never trigger an event.
However, it makes sense to process it because you may have a local relay that transmits mails over to the mail provider. In those circumstances, you should have 2 "sent" events (one from the relay and another one from the provider).
Also marked some useless parts of code for removal.
@Tecnativa TT32365
Mass mailing are tracked from mail.trace as the don't store a message in
the db. In order to gather the message_id and be able to do manual
checks to mailgun, that's the table where we should get the message id.
TT40816
- Any model inheriting from mail.thread will have a filter available to
obtain records with errors in their messages trackings.
- The messages can be marked as done to avoid false positives when the
issues are solved.
On our server,
queries based on "mail_tracking_event"."tracking_email_id" improved from 501,924 ms to 1,840 ms
queries based on "mail_tracking_email"."mail_message_id" improved from 167,436 ms to 3,223 ms
The last ones are run several times when a thread has many messages