[MERGE] forward port of branch 7.0 up to 75d3ea6
[odoo/odoo.git] / addons / email_template / email_template.py
index d8b0f61..ed19efd 100644 (file)
@@ -451,7 +451,8 @@ class email_template(osv.osv):
                 values = results[res_id]
                 if 'body_html' in fields and template.user_signature:
                     signature = self.pool.get('res.users').browse(cr, uid, uid, context).signature
-                    values['body_html'] = tools.append_content_to_html(values['body_html'], signature)
+                    if signature:
+                        values['body_html'] = tools.append_content_to_html(values['body_html'], signature)
                 if values.get('body_html'):
                     values['body'] = tools.html_sanitize(values['body_html'])
                 values.update(