[FIX] mail: unlink only sent emails, not failed emails.
bzr revid: tde@openerp.com-20140425122726-k5upt8tq5xp4m228
This commit is contained in:
parent
a32d8cb9de
commit
88f7865043
|
@ -135,7 +135,7 @@ class mail_mail(osv.Model):
|
||||||
:param browse_record mail: the mail that was just sent
|
:param browse_record mail: the mail that was just sent
|
||||||
:return: True
|
:return: True
|
||||||
"""
|
"""
|
||||||
if mail.auto_delete:
|
if mail_sent and mail.auto_delete:
|
||||||
# done with SUPERUSER_ID to avoid giving large unlink access rights
|
# done with SUPERUSER_ID to avoid giving large unlink access rights
|
||||||
self.unlink(cr, SUPERUSER_ID, [mail.id], context=context)
|
self.unlink(cr, SUPERUSER_ID, [mail.id], context=context)
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in New Issue