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

I want to show only the first invoice line the qweb report and skip the second one,

As you can see the invoice below


I want to skip the line in yellow


Please check the below code

https://drive.google.com/file/d/10Ot9Eh6iwNado5yEaz0Ze51Kx6B_cH0i/view?usp=share_link


아바타
취소
베스트 답변

Hi,

If you need to print only the first line from the invoice lines, you can add an if condition inside the for loop to print only the first iteration.

In the code in the shared link, after this code:      , add an if condition to check whether it is first iteration, if yes, we will print else will skip.

                      <t t-foreach="lines" t-as="line">
<t t-if="line_index == 0">

t>
t>



Thanks

아바타
취소
작성자

Thanks that worked

관련 게시물 답글 화면 활동
2
12월 24
8223
0
11월 23
2901
2
1월 23
4301
1
10월 22
5519
0
7월 22
9