تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
6150 أدوات العرض

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
ديسمبر 16
5628
3
أغسطس 20
10469
0
يناير 24
1589
0
يناير 24
1275
0
سبتمبر 23
1924