Skip to Content
Menu
This question has been flagged
4 Replies
7067 Views

hello, please anybody can help :

I m building a email template, used for auto server action, to send mail related to crm.lead .

How can i add lead's message body into mail template?

I use   ${object.message_ids[0].body}  in template , but message body is html field, so the mail i get will contain html code in text format.

Avatar
Discard

Hello!

I've the same problem .

Did you found a way to do it ?

Best Answer

Hi, you can write

<field name="body_html">[![CDATA[

<p>Dear {object.partner_id.name}

Here is your document ${object.name}....................

</p>

]]>

</field>


Avatar
Discard
Best Answer

Is possible  to insert html field in an email template.
Just do this :
${object.message_ids[0].body | safe }

Avatar
Discard

Just what I was looking for, Thank!

Author Best Answer

Hi GiusyG

it has to be put in codes right?

This server is installed from odoo deb, i can not access to code. 

Even in "Server Actions", when "Action To Do" is set to "excute Python code" , i can not put any codes, because the box below is un editable ( i don't know if it is alright or caused by incorrect installation).

Avatar
Discard