Hi all !
I'll try to be as clear as possible.
I'm creating a web view so creating an xml file.
I have a table to show different size of same product.
But if there is more than 7 I want to create a new row to keep it clear on webpage.
So I have a conditional on the index_i variable (didn't still understood how to use $a_index)
when 7 is reached I want to add "</tr><tr>" to make a new row.
But when updating the module I have an error :"lxml.etree.XMLSyntaxError: expected '>' "
Here is my code :
<table border="1">
<tr>
<t t-set="attribute" t-value="toto.product_variant_ids"/>
<t t-set="index_i" t-value="1"/>
<t t-foreach="attribute" t-as="tutu">
<p t-if="index_i==7">
</tr><tr>
</p>
<td>
<p t-esc="tutu.display_name"/>
</td>
<t t-set="index_i" t-value="index_i+1"/>
</t>
</tr>
</table>
Any idea ?
Thanks a lot !
================ THE SOLUTION : ============
I changed this part of code :
<p t-if="index_i==7">
</tr><tr>
</p>
by :
<t t-if="index_i==10 or index==5">
<tr></tr>
</t>
note the inversion of <tr></tr>