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 Jun 4, 2024
1 parent 5e49856 commit e354bf7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 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 json_float_round

from .amount import SaleLineAmount


Expand All @@ -20,5 +22,8 @@ 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=json_float_round(
odoo_rec.product_uom_qty,
precision_rounding=odoo_rec.product_uom.rounding,
),
)

0 comments on commit e354bf7

Please sign in to comment.