From c4090ef57b2288ed219cfb5b9abb5997b4f85bbc Mon Sep 17 00:00:00 2001 From: Mqdd Date: Sat, 7 Mar 2026 13:43:40 +0700 Subject: fallback if mastersku not found use sku instead --- fixco_custom/models/detail_order.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fixco_custom/models/detail_order.py b/fixco_custom/models/detail_order.py index a01e7a1..8df3687 100755 --- a/fixco_custom/models/detail_order.py +++ b/fixco_custom/models/detail_order.py @@ -247,8 +247,8 @@ class DetailOrder(models.Model): } if partner == 281: data['marketplace_discount'] = total_discounts - data['marketplace_tax'] = total_tax - data['delivery_amount'] = total_shipping_fee + # data['marketplace_tax'] = total_tax + # data['delivery_amount'] = total_shipping_fee return data @@ -257,7 +257,9 @@ class DetailOrder(models.Model): product_quantities = {} for item in items: - key = item.get('sku') + key = item.get('sku', "") + if key == "" or key == False: + key = item.get('masterSku', "") qty = item.get('quantity', 0) price = item.get('actualPrice', 0) -- cgit v1.2.3