Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
6109 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Penulis

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

Post Terkait Replies Tampilan Aktivitas
3
Des 16
5618
3
Agu 20
10444
0
Jan 24
1556
0
Jan 24
1251
0
Sep 23
1898