Community mailing list archives

community@mail.odoo.com

Re: [QWeb] get variable value from loop

by
OpusVL, Peter Alabaster
- 01/29/2015 04:18:29
Have you tried:

            <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="line.flag" t-value="True"/>
                <!-- flag now True -->
            </tr>
            <!-- flag again False -->


On 29/01/15 08:57, CodUP wrote:
<blockquote cite="mid:1422521633.185046422@f70.i.mail.ru" type="cite">            <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 -->