append_content_to_html expects two strings. If the user has no signature, it returns user.signature returns False
or False
if 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['body_html']:
values['body'] = tools.html_sanitize(values['body_html'])