[ADD] mail_single_send_several_recipients module#128
Open
chafique-delli wants to merge 3 commits into10.0from
Open
[ADD] mail_single_send_several_recipients module#128chafique-delli wants to merge 3 commits into10.0from
chafique-delli wants to merge 3 commits into10.0from
Conversation
hparfr
requested changes
Oct 1, 2020
| ======================================== | ||
|
|
||
| With this module, when there are several recipients, | ||
| Odoo send only one e-mail with all the addressees and no, one email per address. |
Member
There was a problem hiding this comment.
Suggested change
| Odoo send only one e-mail with all the addressees and no, one email per address. | |
| Odoo sends only one single e-mail with all the addressees and instead of one email per address. |
| email_to = [] | ||
| for partner in self.recipient_ids: | ||
| email_to.append(formataddr((partner.name, partner.email))) | ||
| self.recipient_ids = [(6, 0, [])] |
Member
There was a problem hiding this comment.
no super ?
Why not the following :
partner=None
self.recipient_ids = [(6,0, [])]
super().send_get_mail_to()
Member
Author
There was a problem hiding this comment.
@hparfr ,
Because the super() method without partner uses the 'tools.email_split_and_format' method which uses the 'email.utils.getaddresses' method which does not list email addresses correctly.
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.
With this module, when there are several recipients,
Odoo send only one e-mail with all the addressees and no, one email per address.