Search code examples
odooqweb

How to check if a float is lesser than 0 in QWEB report


I want to know if there is a special keyword as alternative to > in QWEB report.
I found gt (maps to >) but it shows the following error message:

QWebException: invalid syntax (, line 1)

Code:

<t t-if="total gt 0">
    <t t-esc="total"/>
</t>

Solution

  • You need to use html codes or in this situation you can use the named codes, too.

    > = &gt; = &#62;
    < = &lt; = &#60;