Community mailing list archives

community@mail.odoo.com

Odoo qweb invalid syntax in dynamically generated structures

by
Paul Catinean
- 01/19/2015 11:38:21
Hello everyone

I wanted to know how does one handle a dynamically generated table in qweb

For example generating a table that displays the information in two cells per row:

<t t-foreach="list" t-as="item">
    <tr t-if="item_even">
        <td><span t-field="item"></td>
    </tr t-if="item_odds>
</t>

This will not work since it's invalid xml because the closing tag has a property and neither will <t t-if="condition"> </tr> </t> since the closing tag is embeded in what the xml sees another tag

Any way around this?