Skip to Content
Menu
This question has been flagged
1 Reply
5807 Views

Hi,
Can anyone please tell me how i can jump on next line on the basis of field value is '0' & print the values after jumping on next line in qweb.

Avatar
Discard
Best Answer

Hi,

You can use a if condition inside the foreach and execute the condition based on if condition. In the if condition you can check whether the field value is 0 or not.

See this sample,

<t t-foreach="a.value_ids" t-as="v">
<t t-if="v.id in attrib_set">
<t t-set="attr_section_open" t-value="True"/>
</t>
</t>

Thanks

Avatar
Discard
Author

Okay Thank you so much.