跳至內容
選單
此問題已被標幟
1 回覆
2598 瀏覽次數

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
9066
0
11月 23
3404
2
1月 23
4742
1
10月 22
6225
0
7月 22
9