From d5129c1eebca410cbbeb8198269551fdd5e3f91e Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Sat, 12 Mar 2011 01:45:14 +0100 Subject: [PATCH] [FIX] email_template: avoid trying to write on auto-deleted messages bzr revid: odo@openerp.com-20110312004514-gbsfs68kbdho0c8m --- addons/email_template/email_template_mailbox.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/email_template/email_template_mailbox.py b/addons/email_template/email_template_mailbox.py index 49d61bf05df..4486cb5451e 100644 --- a/addons/email_template/email_template_mailbox.py +++ b/addons/email_template/email_template_mailbox.py @@ -92,6 +92,7 @@ class email_template_mailbox(osv.osv): self.unlink(cr, uid, [id], context=context) # Remove attachments for this mail attachment_pool.unlink(cr, uid, values['attachments_ids'], context=context) + return result else: self.write(cr, uid, id, {'folder':'sent', 'state':'na', 'date_mail':time.strftime("%Y-%m-%d %H:%M:%S")}, context) self.historise(cr, uid, [id], "Email sent successfully", context)