← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:kmsistemas-openerp-addons into lp:ocb-addons/6.1

 

Jordi Llinares - KM Sistemas has proposed merging lp:kmsistemas-openerp-addons into lp:ocb-addons/6.1.

Requested reviews:
  OpenERP Community Backports Team (ocb)
Related bugs:
  Bug #1256619 in OpenERP Community Backports (Addons): "[6.1] report_stock_inventory wrongly declared column & SQL"
  https://bugs.launchpad.net/ocb-addons/+bug/1256619
  Bug #1268654 in OpenERP Community Backports (Addons): "[6.1] Mailing from template fails when signature is on and no plain text"
  https://bugs.launchpad.net/ocb-addons/+bug/1268654

For more details, see:
https://code.launchpad.net/~jorgellinares/ocb-addons/6.1/+merge/201461

[FIX] Fix of bug lp:1268654, where generate_email threw an exception when an email with user signature was generated from a template with no plain text body.
-- 
https://code.launchpad.net/~jorgellinares/ocb-addons/6.1/+merge/201461
Your team OpenERP Community Backports Team is requested to review the proposed merge of lp:kmsistemas-openerp-addons into lp:ocb-addons/6.1.
=== modified file 'email_template/email_template.py'
--- email_template/email_template.py	2012-08-20 08:30:47 +0000
+++ email_template/email_template.py	2014-01-13 17:06:05 +0000
@@ -336,7 +336,10 @@
 
         if template.user_signature:
             signature = self.pool.get('res.users').browse(cr, uid, uid, context).signature
-            values['body_text'] += '\n\n' + signature
+            if values['body_text']:
+                values['body_text'] += '\n\n' + signature
+            if values['body_html']:
+                values['body_html'] += '<br/><br/>' + signature
 
         values.update(mail_server_id = template.mail_server_id.id or False,
                       auto_delete = template.auto_delete,


Follow ups