Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
2553 Переглядів

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

             

                %

             

       

       

   


Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
жовт. 21
3815
PDF reports Вирішено
5
лип. 25
2163
Wrong PDF Format Вирішено
2
бер. 24
2701
2
трав. 23
3107
0
лист. 22
2907