If an exception is caught by ir.mail_server.send_email in mail_tracking module,
the mail.tracking.email record will appear in error but the related mailing
trace would still appear as sent because mail.mail._postprocess_sent_message is
called without any failure_type in mail.mail._send in the mail module (as Exception
is not raised after being caught in mail_tracking module).
Since _postprocess_sent_message method not only sets the mailing.trace state in
mass_mailing module but can also delete the mail.mail records in mail module,
we need to ensure the mailing.trace is written accordingly to the tracking here,
and avoid having the mass_mailing module set a 'sent' status if we had an exception,
hence the usage of a context key to ignore possible writes.
* Change references to mail_mail_statistics model with mail_trace
* Change references to mail.mass_mailing model with mailing.mailing
* Change reference to statistics_ids field with mailing_trace_ids
* Change reference to send_mail method with action_send_mail
* Replace mailing.mailing name for required subject field
* fix view reference not_blacklisted with filter_not_email_bl
* fix not-stored compute, set value for all the records
[ADD] mail_tracking_mass_mailing
==============================
Mail tracking for mass mailing
==============================
Links mail statistics objects with mail tracking objects.
Installation
============
This addon will be automatically installed when 'mail_tracking' and
'mass_mailing' are both installed
Usage
=====
From mail statistic object, you can see:
- Email tracking state
- Email related tracking object
- Email related tracking events
From mass mailing contact, you can see:
- Email score, in order to clean up your lists from bad score emails
As a bonus feature, you have a new checkbox 'Avoid resend' in mass mailing,
in order to not send twice the same email to the same recipient. This is very
useful when you want to resend the mass mailing after changing selection
recipients. Notice that recipient selection could be a domain over a model, so
result ids could change over the time. With this flag you can send
the same email several times but only once to each recipient.
OCA Transbot updated translations from Transifex
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`.
- As the tracker img in the body is currently also used to set the
X-Odoo-MailTracking-ID mail header we can remove the tag only
after this is done
- Added tests to check for the presence and absence of the tracking
image tag depending on the new configuration parameter
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
If a user tries to read a thread on a record and one message is from a
partner on which he has no permissions, there will be an exception as
this method tries to fetch info from such partner.
TT43075
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
In migration #873 the classes DiscussController and MailController which
are the result of an upstream functionality split are merge altogether
in this module override causing undesired side effects in other modules
trying to extend those (i.e.: portal)
TT41432