[FIX] mass_mailing: unlink mail.message of test mails#263139
Closed
fw-bot wants to merge 1 commit into
Closed
Conversation
Contributor
Contributor
Author
|
@delcourtfl @tde-banana-odoo cherrypicking of pull request #262152 failed. stdout: Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).
More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
43f0a5d to
c63ef72
Compare
**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
c63ef72 to
03f8296
Compare
Contributor
Author
|
@delcourtfl @tde-banana-odoo this forward port of #262152 is awaiting action (not merged or closed). |
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>
This was referenced May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Steps to reproduce:
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_testby settingis_notificationto False to trigger theunlinklogic and remove the related attachments at the same time.backport of: 526b3d7
opw-6168632
Forward-Port-Of: #262152