Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
[[ repeatIn([line for line in o.order_line if (line.is_option)],'line') ]]
I want to loop on all the lines of an order line wich are options lines (i put a boolean to handle that). The problem is when i don't have option lines in my sale order, i have the error : (<type 'exceptions.assertionerror'="">, AssertionError(), <traceback object="" at="" 0x09064508="">)
Any ideas to handle that problem ? Thanks
I don't have any idea how to skip loop iteration when given condition satisfy. But there is an alternate, you can remove content when your condition satisfy.
For example I want to remove row from table when line.is_option is True:
[[ repeatIn([line for line in o.order_line 'line') ]] <tr><td> <para style="terp_default_9">Desc. : [[ (line.name and not line.is_option) or removeParentNode('tr') ]]</para> </td></tr>
Hope this will help you.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 5/17/13, 11:15 AM|
|Seen: 2028 times|
|Last updated: 3/16/15, 8:10 AM|