[FIX] mail: disable prefetching on send mail
Minimal backport of 00bd7274
Processing large mails may reach the memory limit and crash the mail queue.
Such scenario was found at opw-724697
This commit is contained in:
@@ -208,8 +208,9 @@ class MailMail(models.Model):
|
||||
"""
|
||||
IrMailServer = self.env['ir.mail_server']
|
||||
|
||||
for mail in self:
|
||||
for mail_id in self.ids:
|
||||
try:
|
||||
mail = self.browse(mail_id)
|
||||
# TDE note: remove me when model_id field is present on mail.message - done here to avoid doing it multiple times in the sub method
|
||||
if mail.model:
|
||||
model = self.env['ir.model'].sudo().search([('model', '=', mail.model)])[0]
|
||||
|
||||
Reference in New Issue
Block a user