Amit Bhavsar (Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-1103693-amb into lp:openobject-addons.
Requested reviews: OpenERP Core Team (openerp) Related bugs: Bug #1103693 in OpenERP Addons: "[Trunk/7.0] email_template crashes in send_mail if there is an attachment" https://bugs.launchpad.net/openobject-addons/+bug/1103693 For more details, see: https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1103693-amb/+merge/145863 Hello, Fixes the problem of traceback when send mail with attachment. Thanks! -- https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1103693-amb/+merge/145863 Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-1103693-amb.
=== modified file 'email_template/email_template.py' --- email_template/email_template.py 2012-12-17 14:43:06 +0000 +++ email_template/email_template.py 2013-01-31 13:53:28 +0000 @@ -370,7 +370,7 @@ ir_attachment = self.pool.get('ir.attachment') 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 {} + attachments = dict(values.pop('attachments')) or {} del values['email_recipients'] # TODO Properly use them. msg_id = mail_mail.create(cr, uid, values, context=context) # link attachments
_______________________________________________ Mailing list: https://launchpad.net/~openerp-dev-gtk Post to : openerp-dev-gtk@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-dev-gtk More help : https://help.launchpad.net/ListHelp