[FIX] mass_mailing: access error when 'Retry'
A user without 'Administration/Settings' access rights cannot use the 'Retry' button on a mass-mailing. This is because only this level of power is allowed to unlink `mail.mail` records. However, this button is supposed to be used by regular mass mailing users. opw-744616
This commit is contained in:
@@ -517,7 +517,7 @@ class MassMailing(models.Model):
|
||||
def retry_failed_mail(self):
|
||||
failed_mails = self.env['mail.mail'].search([('mailing_id', 'in', self.ids), ('state', '=', 'exception')])
|
||||
failed_mails.mapped('statistics_ids').unlink()
|
||||
failed_mails.unlink()
|
||||
failed_mails.sudo().unlink()
|
||||
self.write({'state': 'in_queue'})
|
||||
|
||||
#------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user