콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2599 화면

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

             

                %

             

       

       

   


아바타
취소
관련 게시물 답글 화면 활동
1
10월 21
3861
PDF reports 해결 완료
5
7월 25
2251
Wrong PDF Format 해결 완료
2
3월 24
2772
2
5월 23
3172
0
11월 22
2990