Skip to Content
Menu
This question has been flagged
5 Replies
1275 Views

Hi guys 

In the Qweb report i  want to hide a number if it has a decimal 

I tried this t-if="int(l.product_uom_qty)" but it's only working with numbers<1 

Avatar
Discard
Author Best Answer

I actually found the answer 

For anyone having the same problem this is the answer : t-if="l.product_uom_qty % 1 == 0"


Thanks for helping

Avatar
Discard
Best Answer

Hi,

Please try this

<span t-esc="int(l['product_uom_qty'])"/>

Thanks !!!  


Aswini @ iWesabe

Avatar
Discard
Author

Still the same problem.. Thanks for helping

Best Answer


Try This :-

<span t-esc="'%.0f'% field_name"/>


Avatar
Discard
Author

I'm trying to hide the whole number not just the numbers after the decimal point