-
-
Notifications
You must be signed in to change notification settings - Fork 587
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
[MIG][12.0] mass_mailing_newsletter_welcome_mail #452
[MIG][12.0] mass_mailing_newsletter_welcome_mail #452
Conversation
- Allow user to customize template. - Only react when someone subscribes from the website. Not when creating a contact from the backend. - Proper usage of context values. - Full instructions.
f1df1bc
to
33eda91
Compare
('email', '=', email), | ||
("opt_out", "=", False), | ||
contact_obj = request.env["mail.mass_mailing.contact"].with_context( | ||
default_list_ids=[list_id]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please answer about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now in v12 the contacts are not opted out by themselves, but they are opted out or not from a particular list. One way to search contacts that are opted out from a particular list is that, by searching by the opt_oup field of mass.mailing.contact (which is now a calculated field) and passing in the context the list id.
check this
https://github.com/odoo/odoo/blob/fe35870fa0024a1e8adebb386f343f25fdea2c7b/addons/mass_mailing/models/mass_mailing.py#L250
On the other hand, I assumed that so in v11 we didn't want to send mail to contacts that had been opted out from the list, now in v12 that blacklisting exists, we don't whant either to send mail to those who are blacklisted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, if they are subscribing just now, how they are going to be opted-out?
If you keep it (and for the rest of cases), please always explain this not easy to deduce things as a comment in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe in Odoo 11.0 this is not necessary but in v12 yes because the re-subscription of a contact doesn't work well. I made a issue to Odoo for this: odoo/odoo#39604
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, then please add that as comment:
# Needed for being re-subscribed while odoo/odoo#39604 is not fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
33eda91
to
735b9e7
Compare
Changes done |
735b9e7
to
950518a
Compare
/ocabot merge |
On my way to merge this fine PR! |
Congratulations, your PR was merged at a63fcea. Thanks a lot for contributing to OCA. ❤️ |
Cc @Tecnativa TT19367