[IMP] email_template: dont give mail.mail.create() an unneeded email_recipients field.

bzr revid: vmt@openerp.com-20121116113551-le30lwfmignrxl0e
This commit is contained in:
Vo Minh Thu 2012-11-16 12:35:51 +01:00
parent 071de66193
commit 2cd9443b92
1 changed files with 1 additions and 0 deletions

View File

@ -345,6 +345,7 @@ class email_template(osv.osv):
values = self.generate_email(cr, uid, template_id, res_id, context=context)
assert 'email_from' in values, 'email_from is missing or empty after template rendering, send_mail() cannot proceed'
attachments = values.pop('attachments') or {}
del values['email_recipients'] # TODO Properly use them.
msg_id = mail_mail.create(cr, uid, values, context=context)
# link attachments
attachment_ids = []