Odoo Help

0

t-js not working inside report template - odoo 9

By
Alessandro Romano
on 8/5/16, 6:18 AM 719 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);
 </t>
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?

thanks

0
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.

Register

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)

Stats

Asked: 8/5/16, 6:18 AM
Seen: 719 times
Last updated: 8/5/16, 7:57 PM