Skip to content

[FIX] mass_mailing: unlink mail.message of test mails#263139

Closed
fw-bot wants to merge 1 commit into
odoo:saas-19.2from
odoo-dev:saas-19.2-17.0-opw-6168632-mass_mailing_unlink_test_mail_message-defl-524045-fw
Closed

[FIX] mass_mailing: unlink mail.message of test mails#263139
fw-bot wants to merge 1 commit into
odoo:saas-19.2from
odoo-dev:saas-19.2-17.0-opw-6168632-mass_mailing_unlink_test_mail_message-defl-524045-fw

Conversation

@fw-bot
Copy link
Copy Markdown
Contributor

@fw-bot fw-bot commented May 6, 2026

Steps to reproduce:

  • Go to Email Marketing app
  • Create a mailing campaign
  • Set its recipients to Contact
  • Upload a file in Settings > Attach a file
  • Click on the test button to send a test mail to any mail
  • Go to the first contact record
  • Related attachment appears in the chatter

Issue:
Before 18.2, messages created for testing were ignored by the Chatter as they were empty (and not unlinked).

But if an attachment was provided, it was linked to the test message and not deleted afterwards (which means it shows up in the record chatter).

Fix:
Ensure the related messages are unlinked at the same time as the test mail in send_mail_test by setting is_notification to False to trigger the unlink logic and remove the related attachments at the same time.

backport of: 526b3d7

opw-6168632

Forward-Port-Of: #262152

@robodoo
Copy link
Copy Markdown
Contributor

robodoo commented May 6, 2026

Pull request status dashboard

@robodoo robodoo added forwardport This PR was created by @fw-bot conflict There was an error while creating this forward-port PR labels May 6, 2026
@fw-bot
Copy link
Copy Markdown
Contributor Author

fw-bot commented May 6, 2026

@delcourtfl @tde-banana-odoo cherrypicking of pull request #262152 failed.

stdout:

Auto-merging addons/mass_mailing/wizard/mailing_mailing_test.py
CONFLICT (content): Merge conflict in addons/mass_mailing/wizard/mailing_mailing_test.py
Auto-merging addons/test_mass_mailing/tests/test_mailing_test.py
CONFLICT (content): Merge conflict in addons/test_mass_mailing/tests/test_mailing_test.py

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

:shipit: you can use git-fw to re-do the forward-port for you locally.

⚠️ after resolving this conflict, you will need to merge it via @robodoo.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@delcourtfl delcourtfl force-pushed the saas-19.2-17.0-opw-6168632-mass_mailing_unlink_test_mail_message-defl-524045-fw branch from 43f0a5d to c63ef72 Compare May 7, 2026 09:55
@C3POdoo C3POdoo requested review from a team May 7, 2026 10:17
**Steps to reproduce:**
- Go to Email Marketing app
- Create a mailing campaign
- Set its recipients to Contact
- Upload a file in Settings > Attach a file
- Click on the test button to send a test mail to any mail
- Go to the first contact record
- Related attachment appears in the chatter

**Issue:**
Before 18.2, messages created for testing were ignored
by the Chatter as they were empty (and not unlinked).

But if an attachment was provided, it was linked to the
test message and not deleted afterwards (which means
it shows up in the record chatter).

**Fix:**
Ensure the related messages are unlinked at the same time as
the test mail in `send_mail_test` by setting `is_notification`
to False to trigger the `unlink` logic and remove the related
attachments at the same time.

backport of: odoo@526b3d7

opw-6168632

X-original-commit: ac03257
@delcourtfl delcourtfl force-pushed the saas-19.2-17.0-opw-6168632-mass_mailing_unlink_test_mail_message-defl-524045-fw branch from c63ef72 to 03f8296 Compare May 12, 2026 08:27
@fw-bot
Copy link
Copy Markdown
Contributor Author

fw-bot commented May 14, 2026

@delcourtfl @tde-banana-odoo this forward port of #262152 is awaiting action (not merged or closed).

@delcourtfl
Copy link
Copy Markdown
Contributor

robodoo r+

robodoo pushed a commit that referenced this pull request May 15, 2026
**Steps to reproduce:**
- Go to Email Marketing app
- Create a mailing campaign
- Set its recipients to Contact
- Upload a file in Settings > Attach a file
- Click on the test button to send a test mail to any mail
- Go to the first contact record
- Related attachment appears in the chatter

**Issue:**
Before 18.2, messages created for testing were ignored
by the Chatter as they were empty (and not unlinked).

But if an attachment was provided, it was linked to the
test message and not deleted afterwards (which means
it shows up in the record chatter).

**Fix:**
Ensure the related messages are unlinked at the same time as
the test mail in `send_mail_test` by setting `is_notification`
to False to trigger the `unlink` logic and remove the related
attachments at the same time.

backport of: 526b3d7

opw-6168632

closes #263139

X-original-commit: ac03257
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Florentin Delcourt (defl) <defl@odoo.com>
robodoo pushed a commit that referenced this pull request May 15, 2026
**Steps to reproduce:**
- Go to Email Marketing app
- Create a mailing campaign
- Set its recipients to Contact
- Upload a file in Settings > Attach a file
- Click on the test button to send a test mail to any mail
- Go to the first contact record
- Related attachment appears in the chatter

**Issue:**
Before 18.2, messages created for testing were ignored
by the Chatter as they were empty (and not unlinked).

But if an attachment was provided, it was linked to the
test message and not deleted afterwards (which means
it shows up in the record chatter).

**Fix:**
Ensure the related messages are unlinked at the same time as
the test mail in `send_mail_test` by setting `is_notification`
to False to trigger the `unlink` logic and remove the related
attachments at the same time.

backport of: 526b3d7

opw-6168632

closes #263139

X-original-commit: ac03257
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Florentin Delcourt (defl) <defl@odoo.com>
@robodoo robodoo closed this May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflict There was an error while creating this forward-port PR forwardport This PR was created by @fw-bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants