Jinja error when try to run mako template in Odoo
<p>I got this error when I try to run this report which written in mako template:</p>

<pre><code>Encountered unknown tag 'total_price'. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'.

&lt;class 'jinja2.exceptions.TemplateSyntaxError'&gt;,Encountered unknown tag 'total_price'. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'.,&lt;traceback object at 0x02F2F490&gt;
</code></pre>

<p>It was working fine in openerp 7 but in odoo 8 didn't work.</p>

<pre><code>                &lt;% total_price = 0.0 %&gt;
                %for line_container_ids in shipping.container_line_ids:
                    &lt;%
                        total_price = line_container_ids.product_qty * line_container_ids.net_price
                        curr = line_container_ids.currency_id.name
                    %&gt;
                % endfor
</code></pre>