Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3094 Vizualizări

I am trying to run a for loop in the email template of Odoo 15 and it is not working.



     % for line in object.purchase_id.order_line:
        

            
            
${line.product_qty}

        

     % endfor

Imagine profil
Abandonează
Cel mai bun răspuns

Hello Golam Mostafa,

Hope you are doing Well.

For running the for loop for email template in odoo 15 has been changed. 

Find Code in Comment. 

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Imagine profil
Abandonează

So for running the loop you can use the reference code below:

<tr t-foreach="object.lines" t-as="line">
<td><span t-field="line.product_id.name"/></td>
<td><span t-field="line.qty"/></td>
<td><span t-field="line.price_unit"/></td>
<td><span t-field="line.price_subtotal_incl"/></td>
</tr>

Related Posts Răspunsuri Vizualizări Activitate
0
oct. 21
2340
2
ian. 24
4256
2
ian. 24
9931
2
dec. 22
5301
1
mar. 21
9488