details: https://code.tryton.org/tryton/commit/61524b93e2e7
branch: default
user: Cédric Krier <[email protected]>
date: Thu Jan 15 17:28:20 2026 +0100
description:
Round quantity instead of truncate for Shopify fulfillment
Closes #14502
diffstat:
modules/web_shop_shopify/stock.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r 0d96a4b8d2ad -r 61524b93e2e7 modules/web_shop_shopify/stock.py
--- a/modules/web_shop_shopify/stock.py Thu Jan 15 15:22:09 2026 +0100
+++ b/modules/web_shop_shopify/stock.py Thu Jan 15 17:28:20 2026 +0100
@@ -200,7 +200,7 @@
return
location_id = id2gid('Location', location_id)
identifier = id2gid('LineItem', self.origin.shopify_identifier)
- quantity = int(Uom.compute_qty(
+ quantity = round(Uom.compute_qty(
self.unit, self.quantity, self.origin.unit))
for fulfillment_order in fulfillment_orders['nodes']:
if fulfillment_order['status'] in {'CANCELLED', 'CLOSED'}:
@@ -254,7 +254,7 @@
ratio = c_quantity / self.origin.quantity
else:
ratio = 1
- quantity = int(sale_line.quantity * ratio)
+ quantity = round(sale_line.quantity * ratio)
for fulfillment_order in fulfillment_orders['nodes']:
if (fulfillment_order['assignedLocation']['location']['id']
!= location_id):