blob: 82b1fcca6e9efa86f4a9f859d0c108361052554a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
from odoo import fields, models, api, _
class MailMail(models.Model):
_inherit = 'mail.mail'
def retry_send_mail(self):
mails = self.env['mail.mail'].search([
('state', 'in', ['exception', 'cancel']),
], limit=250)
for mail in mails:
mail.state = 'outgoing'
|