Odoo Help


t-js not working inside report template - odoo 9

Alessandro Romano
on 8/5/16, 6:18 AM 914 views

I have added this code into invoice report template:

 <t t-set="tax" t-value="o._get_tax_amount_by_group()"/>
 <t t-js="ctx" >
   console.log("tax is", ctx.tax);
but when I print an invoice, the command "console.log" is printed as static text.

It show  this "console.log("tax is", ctx.tax);"

How can I solve this issue?



Axel Mendoza

--Axel Mendoza--
| 7 8 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

Axel Mendoza
On 8/5/16, 7:57 PM

Hi Alessandro Romano

That is not intended to be used in reports, it's for the qweb javascript implementation, reports run under python qweb implementation

thanks. Can you tell me if some test/debug method exist for report template?

Alessandro Romano
on 8/8/16, 5:24 AM

try directly output the debug content to the report itself using t-raw or t-esc

Axel Mendoza
on 10/11/16, 3:21 PM

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: 8/5/16, 6:18 AM
Seen: 914 times
Last updated: 8/5/16, 7:57 PM