コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2552 ビュー

How to add a field on a report only if a box is checked?

アバター
破棄
著作者 最善の回答

Hi Team,

In some cases, your client would like to see an information on the SO only if a box is checked. 

Here is the solution:

1) Add a checkbox field on the model sale.order: x_appear

2) On the report Qweb view related to this model, you should add a "t-if" on the field you want to see or not on the report (with a xpath, of course)

Here is an example for the Margin (and other fields my clients wanted to see (report below the code):

       

t-if="doc.x_appear">

       

         

             

             

             

             

           

 

           

             

             

           

           

             

             

           

         

                Total Cost:

             

               

             

                Margin:

             

               

             

                Margin%:

             

                %

             

       

       

   


アバター
破棄
関連投稿 返信 ビュー 活動
1
10月 21
3815
PDF reports 解決済
5
7月 25
2163
2
3月 24
2701
2
5月 23
3107
0
11月 22
2907