Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
6152 มุมมอง

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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?

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ธ.ค. 16
5633
3
ส.ค. 20
10469
0
ม.ค. 24
1589
0
ม.ค. 24
1277
0
ก.ย. 23
1925