You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
695 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2019 Therp BV <https://therp.nl>
  3. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  4. from openerp import api, models
  5. class MailMail(models.Model):
  6. _inherit = 'mail.mail'
  7. @api.model
  8. def process_email_queue(self, ids=None):
  9. if not ids:
  10. ids = self.search(
  11. [('state', '=', 'outgoing')] + self.env.context.get(
  12. 'filters', []
  13. ),
  14. limit=int(self.env['ir.config_parameter'].get_param(
  15. 'mail_queue_send_limit.limit', '100',
  16. )),
  17. ).ids
  18. return super(MailMail, self).process_email_queue(ids=ids)