Skip to content

[20.0][MIG] mail_recipient_tracking_mass_mailing: Migration to 20.0 - #331

Open
weinni2000 wants to merge 22 commits into
OCA:20.0from
weinni2000:20.0-mig-mail_tracking_mass_mailing
Open

weinni2000 wants to merge 22 commits into
OCA:20.0from
weinni2000:20.0-mig-mail_tracking_mass_mailing

Conversation

@weinni2000

Copy link
Copy Markdown
  • Rename to mail_recipient_tracking_mass_mailing (whole history): Odoo 20 ships a core mail_tracking_mass_mailing module, and the mail_tracking dependency is renamed to mail_recipient_tracking in [20.0][MIG] mail_tracking: Migration to 20.0 and rename to mail_recipient_tracking #310 (pulled in through test-requirements.txt).
  • Tests: DISABLED_MAIL_CONTEXT is gone in Odoo 20; use DISABLED_MAIL_CREATE_CONTEXT plus tracking_disable/mail_notrack.
  • mailing.trace.write(): don't reassign self (ruff PLW0642).

Migration changes only (diff after the pre-commit auto fixes): weinni2000#1

Migrated with odev.

Assisted-by: Claude Code (claude-opus-5-5)

antespi and others added 22 commits October 31, 2026 18:00
[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
OCA Transbot updated translations from Transifex
Testing this addon failed if i.e. `mass_mailing_list_dynamic` was installed before.

Moving tests to post-install mode fixes integration tests.
* Standard procedure
* Adapt tests
* New README by fragments

[UPD] README.rst
Update translation files

    [UPD] Update mail_tracking_mass_mailing.pot

    Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

    Translation: social-12.0/social-12.0-mail_tracking_mass_mailing
    Translate-URL: https://translation.odoo-community.org/projects/social-12-0/social-12-0-mail_tracking_mass_mailing/

[UPD] README.rst

Translated using Weblate (Portuguese)

    Currently translated at 94.7% (18 of 19 strings)

    Translation: social-12.0/social-12.0-mail_tracking_mass_mailing
    Translate-URL: https://translation.odoo-community.org/projects/social-12-0/social-12-0-mail_tracking_mass_mailing/pt/

Translated using Weblate (Slovenian)

    Currently translated at 100.0% (19 of 19 strings)

    Translation: social-12.0/social-12.0-mail_tracking_mass_mailing
    Translate-URL: https://translation.odoo-community.org/projects/social-12-0/social-12-0-mail_tracking_mass_mailing/sl/
* 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
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.
Assisted-by: Claude Code (claude-opus-5-5)
@oca-cla-bot

oca-cla-bot Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@OCA-git-bot OCA-git-bot added series:20.0 mod:mail_recipient_tracking_mass_mailing Module mail_recipient_tracking_mass_mailing labels Oct 31, 2026
@weinni2000

Copy link
Copy Markdown
Author

Hi @yajo @chienandalu @trisdoan @ernestotejeda, your earlier commits are part of this migration, and the CLA check fails for Yajo@users.noreply.github.com, jairo.llopis@tecnativa.com, david.vidal@tecnativa.com, doanminhtri8183@gmail.com and ernesto.tejeda87@gmail.com. Could you sign at https://clabot.odoo-community.org/ (or have them added to your company's CLA)? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:mail_recipient_tracking_mass_mailing Module mail_recipient_tracking_mass_mailing series:20.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.