Community mailing list archives

community@mail.odoo.com

[QWeb] get variable value from loop

by
Pyatak
- 01/29/2015 03:53:53
Is it possible get variable value from loop?

For example:

            <t t-set="flag" t-value="False"/>
            <!-- flag now False -->
            <tr t-foreach="o.lines" t-as="line">
                <td><span t-field="line.name"/></td>
                <td><span t-field="line.qty"/></td>
                <t t-set="flag" t-value="True"/>
                <!-- flag now True -->
            </tr>
            <!-- flag again False -->

Variable flag inside loop is different from variable flag outide. How send information outside loop?

Thanks and Best Regards!
Petr Kotov
CodUP
http://codup.com