Skip to content

Commit

Permalink
fix: error negative demand eg: "-1.4210854715202004e-14"
Browse files Browse the repository at this point in the history
  • Loading branch information
dnplkndll committed May 31, 2024
1 parent bf31b3d commit 38aef29
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frepple/controllers/outbound.py
Original file line number Diff line number Diff line change
Expand Up @@ -1594,10 +1594,10 @@ def export_salesorders(self):
else "%s %d %d" % (i["order_id"][1], cnt, i["id"])
),
quoteattr(batch),
qty,
odoo.tools.float_round(qty,8) if odoo.tools.float_round(qty,8) > 0 else 0,
due,
priority,
j["picking_policy"] == "one" and qty or 0.0,
j["picking_policy"] == "one" and (odoo.tools.float_round(qty,8) if odoo.tools.float_round(qty,8) > 0 else 0) or 0.0,
status,
quoteattr(product["name"]),
quoteattr(customer),
Expand All @@ -1617,10 +1617,10 @@ def export_salesorders(self):
) % (
quoteattr(name),
quoteattr(batch),
qty,
odoo.tools.float_round(qty,8) if odoo.tools.float_round(qty,8) > 0 else 0,
due,
priority,
j["picking_policy"] == "one" and qty or 0.0,
j["picking_policy"] == "one" and (odoo.tools.float_round(qty,8) if odoo.tools.float_round(qty,8) > 0 else 0) or 0.0,
status,
quoteattr(product["name"]),
quoteattr(customer),
Expand Down

0 comments on commit 38aef29

Please sign in to comment.