bemade-addons/bemade_hide_decimal_on_unit/views/purchase.xml
2025-05-29 21:35:47 -04:00

31 lines
1.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_purchasequotation_document_strip_decimal" inherit_id="purchase.report_purchasequotation_document">
<xpath expr="//tbody//td[hasclass('text-end')]" position="replace">
<td name="td_quantity" class="text-end">
<t t-if="int(order_line.product_uom_qty) == order_line.product_uom_qty">
<span t-esc="'%.0f' % order_line.product_uom_qty"/>
</t>
<t t-else="">
<span t-esc="order_line.product_uom_qty"/>
</t>
<span t-field="order_line.product_uom" groups="uom.group_uom"/>
</td>
</xpath>
</template>
<template id="report_purchaseorder_document_strip_decimal" inherit_id="purchase.report_purchaseorder_document">
<xpath expr="//tbody//td[hasclass('text-end')][1]" position="replace">
<td name="td_quantity" class="text-end">
<t t-if="int(line.product_uom_qty) == line.product_uom_qty">
<span t-esc="'%.0f' % line.product_uom_qty"/>
</t>
<t t-else="">
<span t-esc="line.product_uom_qty"/>
</t>
<span t-field="line.product_uom" groups="uom.group_uom"/>
</td>
</xpath>
</template>
</odoo>