[FIX] email_template: attachments were not being sent due to programming error
bzr revid: odo@openerp.com-20120315155512-s76y2u3gz3awfy74
This commit is contained in:
parent
0284caa8f0
commit
3e0279ac4a
|
@ -393,6 +393,8 @@ class email_template(osv.osv):
|
||||||
}
|
}
|
||||||
context.pop('default_type', None)
|
context.pop('default_type', None)
|
||||||
attachment_ids.append(ir_attachment.create(cr, uid, attachment_data, context=context))
|
attachment_ids.append(ir_attachment.create(cr, uid, attachment_data, context=context))
|
||||||
|
if attachment_ids:
|
||||||
|
mail_message.write(cr, uid, msg_id, {'attachment_ids': [(6, 0, attachment_ids)]}, context=context)
|
||||||
if force_send:
|
if force_send:
|
||||||
mail_message.send(cr, uid, [msg_id], context=context)
|
mail_message.send(cr, uid, [msg_id], context=context)
|
||||||
return msg_id
|
return msg_id
|
||||||
|
|
Loading…
Reference in New Issue