Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
2579 Näkymät

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

Avatar
Hylkää
Tekijä Paras vastaus

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
lokak. 21
3829
PDF reports Ratkaistu
5
heinäk. 25
2188
2
maalisk. 24
2720
2
toukok. 23
3115
0
marrask. 22
2943