Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
2560 Представления

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
3821
PDF reports Решено
5
июл. 25
2168
Wrong PDF Format Решено
2
мар. 24
2701
2
мая 23
3109
0
нояб. 22
2909