Skip to content
Snippets Groups Projects
Commit bbd20dbb authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] mail: allow to set own batch size for mass mailing

parent 8f20351e
No related branches found
No related tags found
No related merge requests found
......@@ -221,7 +221,9 @@ class mail_compose_message(osv.TransientModel):
else:
res_ids = [wizard.res_id]
sliced_res_ids = [res_ids[i:i + self._batch_size] for i in range(0, len(res_ids), self._batch_size)]
batch_size = self.pool['ir.config_parameter'].get_param(cr, SUPERUSER_ID, 'mail.batch_size') or self._batch_size
sliced_res_ids = [res_ids[i:i + batch_size] for i in range(0, len(res_ids), batch_size)]
for res_ids in sliced_res_ids:
all_mail_values = self.get_mail_values(cr, uid, wizard, res_ids, context=context)
for res_id, mail_values in all_mail_values.iteritems():
......
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