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>
<!-- No div will be created in 'false' case -->
Hope it helps!!
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 8/23/16, 8:10 AM|
|Seen: 146 times|
|Last updated: 8/23/16, 9:59 AM|