Skip to content

[19.0][FIX] mail_tracking: retry failed emails without the removed resend wizard - #275

Open
alvaro-domatix wants to merge 1 commit into
OCA:19.0from
alvaro-domatix:19.0-fix-mail_tracking-retry-failed-message
Open

alvaro-domatix wants to merge 1 commit into
OCA:19.0from
alvaro-domatix:19.0-fix-mail_tracking-retry-failed-message

Conversation

@alvaro-domatix

Copy link
Copy Markdown

Problem

In 19.0, clicking Retry on a failed message (chatter failed messages and the Failed mailbox) raises:

The action "mail.mail_resend_message_action" does not exist.

mail_tracking still opens the core resend wizard, but Odoo removed the resend wizards in 19.0 (odoo/odoo#208852), so there is no action left to open.

Fix

  • New mail.message.retry_failed_message: requeues and sends again the failed emails (mail.mail in exception) of the message through the standard mail.mail.action_retry. When every email is sent, the message is marked as reviewed with the existing set_need_action_done, so it leaves the failed lists. It returns whether every email was sent, and the client shows a success or error notification.
  • The Retry button is only shown when the message has a failed email that can be retried (mail_tracking_can_retry, computed only for failed messages). Failures with no email left to retry (e.g. a bounce reported by the recipient server) are resent manually, as in Odoo 19, or set as reviewed.
  • The unused retryFailedMessage of the FailedMessage component, which called the same removed action, is removed.

How it was tested

  • New tests test_retry_failed_message and test_retry_failed_message_without_failed_email.
  • Fresh 19.0 database (community only, no enterprise), install then update with tests: 0 failed, 0 error(s) of 48 tests.
  • pre-commit run on the changed files: all hooks pass.
  • Reproduced on a production 19.0 database where the button raised the error above.

…send wizard

The Retry button of failed messages opened the action
mail.mail_resend_message_action, which no longer exists in 19.0 (Odoo
removed the resend wizards in odoo/odoo#208852), so clicking it raised
"The action mail.mail_resend_message_action does not exist".

The button now calls mail.message.retry_failed_message, which requeues
and sends again the failed emails of the message through the standard
mail.mail retry. When every email is sent, the message is marked as
reviewed. The button is only shown when the message has a failed email
that can be retried; otherwise the message has to be resent manually,
as in Odoo 19, or set as reviewed.

The unused retryFailedMessage of the FailedMessage component is removed,
as it called the same removed action.
@pedrobaeza pedrobaeza added this to the 19.0 milestone Oct 1, 2026
@pedrobaeza

Copy link
Copy Markdown
Member

Please, all the Domatix people, stop approving blindly the PRs, as that approvals are totally biased as can seen in the pattern. Do honest and real reviews.

@alvaro-domatix start rebasing the branch over latest 19.0, which should fix the CI.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants