Hi
I want in report to half the number of rows.
To understand better :
row | name | row | name |
1 | a1 | 3 | c3 |
2 | b2 | 4 | d4 |
<table>
<tr><td> row</td> <td>name</td> <td> row</td> <td>name</td> </tr>
<tr t-foreach="showp()" t-as="tt">
<td> <span t-esc="(tt_index+1)"/> </td>
<td> <span t-esc= "tt[0]" /> </td>
<td> <span t-esc="(tt_index+1)"/> </td> ??????
<td> <span t-esc= "tt[0]" /> </td> ??????
</tr>
</table>
It actually changes in a double for counter.
please help me.
Thanks.
Hi Thanks Ravi Gadhia, but i has error:
Error to render compiling AST
TypeError: 'NoneType' object is not subscriptable
Template:
Path: /templates/t/t/t/t/div/div/t/t/table/t[2]
Node: <t t-set="first_half" t-value="all_data[0]"/>
it means def showp() return None instead of tuple so `all_data` set as None