summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/mail_mail.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/indoteknik_custom/models/mail_mail.py b/indoteknik_custom/models/mail_mail.py
new file mode 100644
index 00000000..26f8bf5c
--- /dev/null
+++ b/indoteknik_custom/models/mail_mail.py
@@ -0,0 +1,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']),
+ ])
+ for mail in mails:
+ mail.state = 'outgoing'