[FIX] mass_mailing: fix links in test mailings #162240
Draft
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.
This commit fixes an issue with the mailing_mailing_test wizard in mass_mailing. When sending a test email the snippets
s_mail_block_header_view
ands_mail_block_footer_social_left
contains placeholder links that are replaced by correct ones when rendered.When the user sends a test mailing the mail sent will still contain the placeholder links without being replaced.
This means that when clicking on them the user is redirected to 404 error as those are mere placeholders.
Those links are not replaced because the mail created inside testing wizard did not give a res_id, linked to a mailing.contact, to the mail.mail created. This led the function
_prepare_outgoing_list
to be exited prematurely without replacing the placeholders.Now we are adding a res_id linked to the current user to the mail.mail created in order for the method to finish its execution.
task-3869575
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr