summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/product_template.py
diff options
context:
space:
mode:
authorIndoteknik . <it@fixcomart.co.id>2025-06-09 15:11:05 +0700
committerIndoteknik . <it@fixcomart.co.id>2025-06-09 15:11:05 +0700
commit1bc03c1482a664ffcd58f19022a40e65e21774c6 (patch)
treef491d00cd1d371c8fd76ad25e014ac8d662c3d02 /indoteknik_custom/models/product_template.py
parent1bd3a91889f8616d7042c0d15315c2f25c974ed3 (diff)
parentf43855aa55265794c7774af79089258e830b0df4 (diff)
(andri) fix merge biteship with odoo-backup
Diffstat (limited to 'indoteknik_custom/models/product_template.py')
-rwxr-xr-xindoteknik_custom/models/product_template.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py
index 2c07824a..f59bea6b 100755
--- a/indoteknik_custom/models/product_template.py
+++ b/indoteknik_custom/models/product_template.py
@@ -349,6 +349,9 @@ class ProductTemplate(models.Model):
'search_key':[item_code],
}
response = requests.post(url, headers=headers, json=json_data)
+ if response.status_code != 200:
+ return 0
+
datas = json.loads(response.text)['data']
qty = 0
for data in datas: