Fix shopify test case
diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py
index 32bb802..e3610e1 100644
--- a/erpnext/assets/doctype/asset/test_asset.py
+++ b/erpnext/assets/doctype/asset/test_asset.py
@@ -22,7 +22,7 @@
pi = make_purchase_invoice(asset.name, asset.item_code, asset.gross_purchase_amount,
asset.company, asset.purchase_date)
-
+ print(pi.name)
pi.supplier = "_Test Supplier"
pi.insert()
pi.submit()
@@ -353,7 +353,6 @@
''', (asset.name))]
if pi:
pi_doc = frappe.get_doc("Purchase Invoice", pi[0])
- print(pi[0])
pi_doc.cancel
# if pi:
# frappe.db.set_value("Purchase Invoice", {"name": pi[0]}, "docstatus", 2)
diff --git a/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py b/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py
index 55f47a6..ff1edea 100644
--- a/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py
+++ b/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py
@@ -216,7 +216,7 @@
"doctype": "Supplier",
"supplier_name": shopify_item.get("vendor"),
"shopify_supplier_id": shopify_item.get("vendor").lower(),
- "supplier_type": get_supplier_type()
+ "supplier_group": get_supplier_group()
}).insert()
return supplier.name
else:
@@ -224,15 +224,15 @@
else:
return ""
-def get_supplier_type():
- supplier_type = frappe.db.get_value("Supplier Type", _("Shopify Supplier"))
- if not supplier_type:
- supplier_type = frappe.get_doc({
- "doctype": "Supplier Type",
- "supplier_type": _("Shopify Supplier")
+def get_supplier_group():
+ supplier_group = frappe.db.get_value("Supplier Group", _("Shopify Supplier"))
+ if not supplier_group:
+ supplier_group = frappe.get_doc({
+ "doctype": "Supplier Group",
+ "supplier_group_name": _("Shopify Supplier")
}).insert()
- return supplier_type.name
- return supplier_type
+ return supplier_group.name
+ return supplier_group
def get_item_details(shopify_item):
item_details = {}