diff options
| author | Christophe Simonis <chs@odoo.com> | 2014-12-02 16:18:08 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2014-12-02 16:18:08 +0100 |
| commit | 1d3f8eba879f02da7fc0bb46c9801029eccbc8c8 (patch) | |
| tree | 10ef917de1be8ef9755cba4f3c9ac951af176b18 /addons/mail/wizard/mail_compose_message.py | |
| parent | 7878b2fd0cb42827b71bd00a1fd8199e73269fe4 (diff) | |
| parent | 591e329bb0efe4997677a0bee2e6f3b558e35df8 (diff) | |
[MERGE] forward port of branch 8.0 up to 591e329
Diffstat (limited to 'addons/mail/wizard/mail_compose_message.py')
| -rw-r--r-- | addons/mail/wizard/mail_compose_message.py | 4 |
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..04decd6d2bf 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 = int(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(): |
