please I would like an example for looping in qweb
I want to loop on purchase_order but i don't know how can i make it
please help me for that
thank you so much
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
please I would like an example for looping in qweb
I want to loop on purchase_order but i don't know how can i make it
please help me for that
thank you so much
Hi Mohammed
There is a sample inside the purchase report, you should do pretty much the same.Have a look at https://github.com/odoo/odoo/blob/8.0/addons/purchase/views/report_purchaseorder.xml
You can loop over data like this:
<table>
<tr t-foreach="o.order_line" t-as="line">
<td>
<span t-field="line.name"/>
</td>
<td>
<span t-esc="', '.join(map(lambda x: x.name, line.taxes_id))"/>
</td>
</tr>
</table>
what about a simple tree view where you dont have one2many field?
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
AanmeldenGerelateerde posts | Antwoorden | Weergaven | Activiteit | |
---|---|---|---|---|
How to open form view by python?
Opgelost
|
|
1
jul. 19
|
14791 | |
|
0
mrt. 15
|
4776 | ||
|
2
mei 22
|
34021 | ||
|
1
nov. 20
|
2665 | ||
|
2
dec. 19
|
11586 |
Yenthe has a good example, you should however know that if you wish to update a variable from inside your loop you need to apply a recent patch: https://github.com/odoo/odoo/issues/4461