i need help about odoo. i want to convert float to int in Odoo14 qweb.
<tr class="border-black">
<td>
<strong>Total Mesin Jalan</strong>
</td>
<td class="text-right">
<span t-value="int(doc.total_mesin_jalan)"/> %%
</td>
</tr>
<tr class="border-black">
<td>
<strong>Presentasi Total</strong>
</td>
<td class="text-right" style="background-color: #3498DB; color: #fff !important;">
<span t-value="int(doc.presentasi_total)"/> %%
</td>
</tr>
im using this method but still not working, and there's nothing show in odoo report it only show the %
<tr class="border-black">
<td>
<strong>Total Mesin Jalan</strong>
</td>
<td class="text-right">
<span t-esc="int(doc.total_mesin_jalan)"/>
</td>
</tr>
<tr class="border-black">
<td>
<strong>Presentasi Total</strong>
</td>
<td class="text-right" style="background-color: #3498DB; color: #fff !important;">
<span t-esc="int(doc.presentasi_total)"/>
</td>
</tr>
Use t-esc instead of t-value inside a span tag.