Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6194 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 12 16
5665
3
thg 8 20
10484
0
thg 1 24
1657
0
thg 1 24
1345
0
thg 9 23
2025