Search code examples
viewodooodoo-10

Display product_uom_qty as integer instead of float


I need to display the field product_uom_qty under sale.order.line (of Sale order) and quantity under account.invoice.line (of an invoice) as an integer instead of the current floating point.

How can I do it?

Please let me know.

Thanks.


Solution

  • Since you are asking for Odoo 10:

    1. Go to Settings in Debug mode.
    2. Under the Technical > Database Structure > Decimal Accuracy click the menu.
    3. Find Product Unit of Measure and edit it to 0 digits.

    This will change whenever product_uom_qty is accessed with Decimal Accuracy precision, not just Sales Orders.