跳至內容
選單
此問題已被標幟
1 回覆
6115 瀏覽次數

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

相關帖文 回覆 瀏覽次數 活動
3
12月 16
5623
3
8月 20
10448
0
1月 24
1558
0
1月 24
1252
0
9月 23
1907