Skip to content
Snippets Groups Projects
Commit 27fdcdf9 authored by Thibault Delavallée's avatar Thibault Delavallée
Browse files

[FIX] mail: correctly compute recipients number

Otherwise all emails are scheduled in the queue.
parent 135ad9e9
No related branches found
No related tags found
No related merge requests found
......@@ -102,7 +102,7 @@ class Partner(models.Model):
@api.model
def _notify_send(self, body, subject, recipients, **mail_values):
emails = self.env['mail.mail']
recipients_nbr, recipients_max = 0, 50
recipients_nbr, recipients_max = len(recipients), 50
email_chunks = [recipients[x:x + recipients_max] for x in xrange(0, len(recipients), recipients_max)]
for email_chunk in email_chunks:
create_values = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment