Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
6168 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Autor

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

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

Related Posts Odpovědi Zobrazení Aktivita
3
pro 16
5638
3
srp 20
10474
0
led 24
1629
0
led 24
1325
0
zář 23
1941