[CLEAN] mail_mail: lean cleaning
bzr revid: tde@openerp.com-20140314174809-t66z5pjxwu1izh6a
This commit is contained in:
parent
ed116d6b6b
commit
95284e1ecf
|
@ -240,7 +240,7 @@ class mail_mail(osv.Model):
|
|||
:return: True
|
||||
"""
|
||||
ir_mail_server = self.pool.get('ir.mail_server')
|
||||
|
||||
|
||||
for mail in self.browse(cr, SUPERUSER_ID, ids, context=context):
|
||||
try:
|
||||
# handle attachments
|
||||
|
@ -284,7 +284,7 @@ class mail_mail(osv.Model):
|
|||
res = ir_mail_server.send_email(cr, uid, msg,
|
||||
mail_server_id=mail.mail_server_id.id,
|
||||
context=context)
|
||||
|
||||
|
||||
if res:
|
||||
mail.write({'state': 'sent', 'message_id': res})
|
||||
mail_sent = True
|
||||
|
@ -307,6 +307,6 @@ class mail_mail(osv.Model):
|
|||
raise MailDeliveryException(_("Mail Delivery Failed"), value)
|
||||
raise
|
||||
|
||||
if auto_commit == True:
|
||||
if auto_commit is True:
|
||||
cr.commit()
|
||||
return True
|
||||
|
|
Loading…
Reference in New Issue