Skip to content
Snippets Groups Projects
Commit 88f78650 authored by Thibault Delavallée's avatar Thibault Delavallée
Browse files

[FIX] mail: unlink only sent emails, not failed emails.

bzr revid: tde@openerp.com-20140425122726-k5upt8tq5xp4m228
parent a32d8cb9
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,7 @@ class mail_mail(osv.Model):
:param browse_record mail: the mail that was just sent
:return: True
"""
if mail.auto_delete:
if mail_sent and mail.auto_delete:
# done with SUPERUSER_ID to avoid giving large unlink access rights
self.unlink(cr, SUPERUSER_ID, [mail.id], context=context)
return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment