summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/product_template.py
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-06-17 08:11:32 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-06-17 08:11:32 +0700
commita2a003a86379fab81b2df36cff5022e1d22a589d (patch)
tree72cb451d0793837d785b74beb79cfe5df000bfc4 /indoteknik_custom/models/product_template.py
parentabd7da741c6eec02dbefa195b91dbedd70b3323e (diff)
parenta8460239603b7a73a185fec394b0f95ab0247207 (diff)
<miqdad> merge 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: