Always decrease Shopify sale line by the refunded quantity

The restock type is only for the stock level calculation of Shopify which is
not useful as Tryton always update the stock level.

Closes #14179
This commit is contained in:
Cédric Krier
2025-08-20 16:29:15 +02:00
parent 39de08712e
commit 2cc6581609
+1 -2
View File
@@ -136,8 +136,7 @@ class Sale(IdentifierMixin, metaclass=PoolMeta):
line = id2line.pop(line_item.id, None)
quantity = line_item.quantity
for refund_line_item in refund_line_items[line_item.id]:
if refund_line_item.restock_type == 'cancel':
quantity -= refund_line_item.quantity
quantity -= refund_line_item.quantity
lines.append(Line.get_from_shopify(
sale, line_item, quantity, line=line))
for shipping_line, line in zip_longest(