- I want to skip the current iteration of the loop with continue in XML foreach ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
Mostafa,
I don't think there is way to skip the loop, alternatively what u can do is, keep "if condition" to do your operation if particular condition matches, for eg:
to print div if your boolean value is true and skip if false, you can use:
<t t-foreach="<list_of_obj>" t-as="obj">
<t t-if="obj.<bool_field>" ><!-- checking if field is True *-->
<div> Created when field is True</div>
</t>
<!-- No div will be created in 'false' case -->
</t>
Hope it helps!!
Dear Pawan.
I find a way out by setting flags using t-set tag and t-value
Thank you for your support !
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
2
ส.ค. 23
|
12256 | ||
|
1
มี.ค. 25
|
462 | ||
|
0
พ.ย. 24
|
820 | ||
|
0
มิ.ย. 24
|
835 | ||
|
1
มิ.ย. 24
|
1341 |