[IMP] email.template: pass proper subtype when HTML content is present
bzr revid: odo@openerp.com-20110930211109-rgx9kmx6rghd5dsf
This commit is contained in:
@@ -305,6 +305,7 @@ class email_template(osv.osv):
|
||||
'attachment_ids': False,
|
||||
'message_id': False,
|
||||
'state': 'outgoing',
|
||||
'subtype': 'plain',
|
||||
}
|
||||
if not template_id:
|
||||
return values
|
||||
@@ -319,6 +320,9 @@ class email_template(osv.osv):
|
||||
template.model, res_id, context=context) \
|
||||
or False
|
||||
|
||||
if values['body_html']:
|
||||
values.update(subtype='html')
|
||||
|
||||
if template.user_signature:
|
||||
signature = self.pool.get('res.users').browse(cr, uid, uid, context).signature
|
||||
values['body_text'] += '\n\n' + signature
|
||||
|
||||
Reference in New Issue
Block a user