[FIX] email_template: system error
bzr revid: hmo@tinyerp.com-20110215070800-0dbt0mn9hljgiidt
This commit is contained in:
parent
b3731151c3
commit
933100051d
|
@ -480,11 +480,11 @@ class email_message(osv.osv):
|
|||
notemplate = context.get('notemplate', False)
|
||||
if (not notemplate) and model and openobject_id:
|
||||
template_pool = self.pool.get('email.template')
|
||||
template_ids = template_pool.search(cr, uid, [('model','=',model)]
|
||||
template_ids = template_pool.search(cr, uid, [('model','=',model)])
|
||||
if template_ids and len(template_ids):
|
||||
template_id = template_ids[0]
|
||||
return template_pool.generate_email(cr, uid, [template_id], openobject_id, context=context)
|
||||
return super(email_message, self).email_send(cr, uid, email_from, email_to, subject, body, model=model, email_cc=email_cc, email_bcc=email_bc, reply_to=reply_to, attach=attach,
|
||||
return super(email_message, self).email_send(cr, uid, email_from, email_to, subject, body, model=model, email_cc=email_cc, email_bcc=email_bc, reply_to=reply_to, attach=attach,
|
||||
message_id=message_id, openobject_id=openobject_id, debug=debug, subtype=subtype, x_headers=x_headers, priority=priority, smtp_server_id=smtp_server_id, context=context)
|
||||
email_message()
|
||||
|
||||
|
|
Loading…
Reference in New Issue