Odoo Help


What is the difference between t-esc and t-raw ?

Karthik Arumugam
on 10/14/15, 5:49 AM 8,765 views

Hi, Anybody please explain me the difference between t-esc and t-raw in odoo qweb reporting



| 8 8 8

My Odoo blog: http://www.odoo.yenthevg.com/

My Twitter: https://twitter.com/Yenthe666

On 10/14/15, 5:58 AM

Hi Karthik,

The difference is in HTML (code) parsing or not. When you use t-esc it will literally print out the value from the field you want to print. When you use t-raw in combination with an HTML field for example it will keep the content in HTML. If you would do a t-esc on an HTML field it will print your HTML code without interpreting it to actual code.

For example you have a field with:

<p>My code</p>

If you would use t-raw it will be handled as HTML and so your <p> element won't be shown because it is converted. When you would do the same with t-esc it would literally print <p>My code</p> on your report.


The documentation that explains this is at:



Hi Yenthe,

i have an html field

I want to change its font type. I tried:

<p style="font-family:serif;">

<span t-raw="doc.terms_and_condition"/>


It prints the content of that field. But font-type not converting to Serif

Ameera PP
on 10/18/17, 11:25 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/14/15, 5:49 AM
Seen: 8765 times
Last updated: 10/18/17, 11:25 AM