[FIX] composer: default content subtype is html (note that plaintext management will be removed asap), name_get is now using an id list instead of a single id.

bzr revid: tde@openerp.com-20121115095309-zu4m6nzndlpmfe5b
This commit is contained in:
Thibault Delavallée 2012-11-15 10:53:09 +01:00
parent d533627d23
commit edb1e07948
1 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@ class mail_compose_message(osv.TransientModel):
_defaults = {
'composition_mode': 'comment',
'content_subtype': lambda self, cr, uid, ctx={}: 'plain',
'content_subtype': lambda self, cr, uid, ctx={}: 'html',
'body_text': lambda self, cr, uid, ctx={}: False,
'body': lambda self, cr, uid, ctx={}: '',
'subject': lambda self, cr, uid, ctx={}: False,
@ -135,7 +135,7 @@ class mail_compose_message(osv.TransientModel):
related to.
:param int res_id: id of the document record this mail is related to
"""
doc_name_get = self.pool.get(model).name_get(cr, uid, res_id, context=context)
doc_name_get = self.pool.get(model).name_get(cr, uid, [res_id], context=context)
if doc_name_get:
record_name = doc_name_get[0][1]
else: