summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMqdd <ahmadmiqdad27@gmail.com>2026-03-07 13:43:40 +0700
committerMqdd <ahmadmiqdad27@gmail.com>2026-03-07 13:43:40 +0700
commitc4090ef57b2288ed219cfb5b9abb5997b4f85bbc (patch)
treea1b2b6c7f052d2ffb3fc2bf2ac35f53cce139825
parent469ffc15ee2b614b729ad95ca1af3e499906f814 (diff)
<Miqdad> fallback if mastersku not found use sku instead
-rwxr-xr-xfixco_custom/models/detail_order.py8
1 files 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)