Skip to Content
Menu
This question has been flagged
2 Replies
4623 Views

Hello,

The UOM column is embarassing in my purchase order reports (and some other reports too).

It can be useful if my products are computed with meters or hours, etc.

But I mostly use the standard unit. And I don't to display "10 unit(s)" each time on my report.

I tried to add in my XML code :

<span t-field="line.product_uom.name" t-if="line.product_uom.name != 'unit'" groups="product.group_uom"/>

But now the column is never displayed, even with the others units of measure.


Do you know how could I solve this issue ?

Thanks a lot,

Regards.

Avatar
Discard
Best Answer

The default UOM name is 'Unit(s)', try:

<t t-if="line.product_uom.name != 'Unit(s)'">
    <span t-field="line.product_uom.name" groups="product.group_uom"/>
</t>
Avatar
Discard
Author Best Answer

Thanks a lot ! It works :)

Avatar
Discard