Skip to content

Commit

Permalink
[IMP] shopinvader_schema_sale: sale_line qty rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
qgroulard committed Feb 20, 2024
1 parent 5e49856 commit e545936
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shopinvader_schema_sale/schemas/sale_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

from extendable_pydantic import StrictExtendableBaseModel

from odoo.tools.float_utils import float_round

from .amount import SaleLineAmount


Expand All @@ -20,5 +22,5 @@ def from_sale_order_line(cls, odoo_rec):
product_id=odoo_rec.product_id.id,
name=odoo_rec.name,
amount=SaleLineAmount.from_sale_order_line(odoo_rec),
qty=odoo_rec.product_uom_qty,
qty=float_round(odoo_rec.product_uom_qty, odoo_rec.product_uom.rounding),
)

0 comments on commit e545936

Please sign in to comment.