Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
2548 Ansichten

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

Avatar
Verwerfen
Autor Beste Antwort

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%:

             

                %

             

       

       

   


Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Okt. 21
3814
5
Juli 25
2162
2
März 24
2699
2
Mai 23
3107
0
Nov. 22
2906