summaryrefslogtreecommitdiff
path: root/addons/mail/wizard
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2014-11-24 16:28:03 +0100
committerDenis Ledoux <dle@odoo.com>2014-11-24 16:38:12 +0100
commitbbd20dbbc55baa1dfac2325a62d8030cc650d168 (patch)
treed71eb0798f15932dc87e85aeb20462aaf8038db3 /addons/mail/wizard
parent8f20351ef50e876ff395c95fd3caf3d4f2c364d9 (diff)
[FIX] mail: allow to set own batch size for mass mailing
Diffstat (limited to 'addons/mail/wizard')
-rw-r--r--addons/mail/wizard/mail_compose_message.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index a0577b6b86a..4e9f6756987 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -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():