Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] mass_mailing: fix links in test mailings #162240

Draft
wants to merge 1 commit into
base: saas-16.3
Choose a base branch
from

Conversation

thjo-odoo
Copy link
Contributor

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 and s_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

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` and
`s_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
@robodoo
Copy link
Contributor

robodoo commented Apr 17, 2024

@C3POdoo C3POdoo added the RD research & development, internal work label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants