details: https://code.tryton.org/tryton/commit/4cd878cfedae
branch: 7.6
user: Cédric Krier <[email protected]>
date: Thu Nov 20 10:10:27 2025 +0100
description:
Do not prevent to process sale line without product and quantity from
Shopify
When a line is removed on Shopify, the quantity of the sale line is set
to 0 in
Tryton because Shopify refund the line.
So such line without product must not prevent to process the sale as
they will
not generate any stock move nor invoice line.
Closes #14375
(grafted from bbd807ca4b87dc0470bd5f3db69681e7371c6d13)
diffstat:
modules/web_shop_shopify/sale.py | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (23 lines):
diff -r 68f395bc7a0b -r 4cd878cfedae modules/web_shop_shopify/sale.py
--- a/modules/web_shop_shopify/sale.py Mon Nov 17 14:38:07 2025 +0100
+++ b/modules/web_shop_shopify/sale.py Thu Nov 20 10:10:27 2025 +0100
@@ -203,12 +203,13 @@
def process(cls, sales):
for sale in sales:
for line in sale.lines:
- if not line.product and line.shopify_identifier:
- raise SaleConfirmError(
- gettext('web_shop_shopify'
- '.msg_sale_line_without_product',
- sale=sale.rec_name,
- line=line.rec_name))
+ if line.shopify_identifier and line.quantity:
+ if not line.product:
+ raise SaleConfirmError(
+ gettext('web_shop_shopify'
+ '.msg_sale_line_without_product',
+ sale=sale.rec_name,
+ line=line.rec_name))
super().process(sales)
for sale in sales:
if not sale.web_shop or not sale.shopify_identifier: