Odoo Help

0

0
1 Answer
0
Danny W. Adair
6/22/15, 12:53 AM

I just fixed this issue for our invoices.

Odoo switched from Mako in v7 to Jinja2 in v8, with a "simulated" Mako notation where _most_ things work as before. Inline Python code doesn't, this "n" filter doesn't.

You have to switch from Mako's "|n" to Jinja2's "|safe" (this filter means "don't escape" - usually applied to things that return HTML).

  • http://docs.makotemplates.org/en/latest/filtering.html

  • http://jinja.pocoo.org/docs/dev/templates/#working-with-automatic-escaping

If you are not using it in your template, it is probably in your base header!

We had a line

${_debug or ''|n}

in there which should read

${_debug or ''|safe}

for Odoo.

Ask a Question
Writer
Keep Informed
1 follower(s)
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.

Register
Odoo Training Center

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

Test it now