Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2576 Widoki

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

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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

             

                %

             

       

       

   


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
paź 21
3827
PDF reports Rozwiązane
5
lip 25
2183
Wrong PDF Format Rozwiązane
2
mar 24
2711
2
maj 23
3113
0
lis 22
2931