[FIX] email_template: fixed attachments management in send_mail.

bzr revid: tde@openerp.com-20130228134901-ibtnt2zl4yne7o4n
This commit is contained in:
Thibault Delavallée 2013-02-28 14:49:01 +01:00
parent afbb5816e3
commit cca0846804
1 changed files with 4 additions and 4 deletions

View File

@ -379,11 +379,11 @@ class email_template(osv.osv):
# manage attachments
attachment_ids = values.pop('attachment_ids', [])
attachments = values.pop('attachments', [])
for fname, fcontent in attachments:
for attachment in attachments:
attachment_data = {
'name': fname,
'datas_fname': fname,
'datas': fcontent,
'name': attachment[0],
'datas_fname': attachment[0],
'datas': attachment[1],
'res_model': values.get('model', False),
'res_id': values.get('res_id', False),
}