[FIX] email_template: do not try to add user signature if none set

append_content_to_html expects two strings. If the user has no signature, it returns user.signature returns False
This commit is contained in:
Denis Ledoux 2014-10-14 13:41:52 +02:00
parent 5e1a5b7dbc
commit 0b13f32868
1 changed files with 2 additions and 1 deletions

View File

@ -319,7 +319,8 @@ class email_template(osv.osv):
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'])