I do not know which is the right syntax for if-else in qweb.
<t t-if="origin != l.origin">
<td>foo</td>
<t t-else/>
<td>bar</td>
</t>
What is wrong here?
You have to use <t t-else=""><td>bar</td></t>
, take a look the documentation.
In above lines you have closed else tag <t t-else/>
You should write as following :
<t t-if="origin != l.origin">
<td>foo</td>
</t>
<t t-else="">
<td>bar</td>
</t>
You also try t-elif :
<t t-if="origin != l.origin">
<td>foo</td>
</t>
<t t-elif="">
<td>bar</td>
</t>
Note for those who are looking for similar problem, t-else
is only added in Odoo 10.
So, for Odoo < 10, negation of t-if
should be used instead.
<t t-if="condition">
</t>
<t t-if="not condition">
</t>
For Odoo >= 10,
<t t-if="condition">
</t>
<t t-else="">
</t>