← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~pedro.baeza/ocb-addons/7.0-lp1122155 into lp:ocb-addons

 

Pedro Manuel Baeza has proposed merging lp:~pedro.baeza/ocb-addons/7.0-lp1122155 into lp:ocb-addons.

Requested reviews:
  OpenERP Community Backports Team (ocb)
Related bugs:
  Bug #1122155 in OpenERP Community Backports (Addons): "[7.0][email_template] Rendering of pdfs not readable when using Send Mail actions on SO or Invoice"
  https://bugs.launchpad.net/ocb-addons/+bug/1122155

For more details, see:
https://code.launchpad.net/~pedro.baeza/ocb-addons/7.0-lp1122155/+merge/217629

[FIX] email_template: problem of corrupted pdf when sending email from email-template.

More info on the bug report.
-- 
https://code.launchpad.net/~pedro.baeza/ocb-addons/7.0-lp1122155/+merge/217629
Your team OpenERP Community Backports Team is requested to review the proposed merge of lp:~pedro.baeza/ocb-addons/7.0-lp1122155 into lp:ocb-addons.
=== modified file 'email_template/email_template.py'
--- email_template/email_template.py	2014-04-15 16:29:11 +0000
+++ email_template/email_template.py	2014-04-29 15:04:40 +0000
@@ -341,7 +341,8 @@
             service = netsvc.LocalService(report_service)
             (result, format) = service.create(cr, uid, [res_id], {'model': template.model}, ctx)
             # TODO in trunk, change return format to binary to match message_post expected format
-            result = base64.b64encode(result)
+            if not ctx['default_composition_mode'] == 'mass_mail':
+                result = base64.b64encode(result)
             if not report_name:
                 report_name = report_service
             ext = "." + format


Follow ups