[IMP] email_template :- generate template to message then donot send the mail bug set state waiting and put in outbox folder.

bzr revid: ysa@tinyerp.com-20110203132617-sx55sje74w765qsx
This commit is contained in:
YSA (Openerp)
2011-02-03 18:56:17 +05:30
parent f140c853ca
commit e9e229568b
+1 -4
View File
@@ -586,10 +586,7 @@ This is useful for CRM leads for example"),
)
if template.report_template or template.attachment_ids:
self.generate_attach_reports(cursor, user, template, record_id, mail, context )
self.pool.get('email.message').write(cursor, user, mailbox_id, {'folder':'outbox'}, context=context)
# TODO : manage return value of all the records
result = self.pool.get('email.message').process_email_queue(cursor, user, [mailbox_id], context)
mailbox_obj.write(cursor, user, mailbox_id, {'folder':'outbox', 'state': 'waiting'}, context=context)
return result
email_template()