Attributes t-esc and t-raw remove empty lines in text

If you use these two attributes in QWeb templates, you should consider that all empty lines from any type of Char fields rendered with them will be removed.

For example, if you use t-esc attribute to display the “note” field from the sales.order model in your QWeb report  and the current value for it in the form view is:

Lorem ipsum dolor sit amet, wisi meliore scriptorem mea eu, prima porro ei eam.

Dicat perpetua an his.

Elit placerat mea te.

The result in the report will be:

Lorem ipsum dolor sit amet, wisi meliore scriptorem mea eu, prima porro ei eam.
Dicat perpetua an his.
Elit placerat mea te.
Share the knowledge!

Leave a Reply

Your email address will not be published. Required fields are marked *