Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2563 Zobrazení

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

Avatar
Zrušit
Autor Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
říj 21
3824
PDF reports Vyřešeno
5
čvc 25
2168
2
bře 24
2704
2
kvě 23
3109
0
lis 22
2912