diff --git a/erpnext/setup/setup_wizard/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py index 8b0189fd4f2..890f31724c0 100644 --- a/erpnext/setup/setup_wizard/setup_wizard.py +++ b/erpnext/setup/setup_wizard/setup_wizard.py @@ -372,7 +372,7 @@ def create_customers(args): customer = args.get("customer_" + str(i)) if customer: try: - frappe.get_doc({ + doc = frappe.get_doc({ "doctype":"Customer", "customer_name": customer, "customer_type": "Company", @@ -383,7 +383,7 @@ def create_customers(args): if args.get("customer_contact_" + str(i)): create_contact(args.get("customer_contact_" + str(i)), - "customer", customer) + "customer", doc.name) except frappe.NameError: pass @@ -392,7 +392,7 @@ def create_suppliers(args): supplier = args.get("supplier_" + str(i)) if supplier: try: - frappe.get_doc({ + doc = frappe.get_doc({ "doctype":"Supplier", "supplier_name": supplier, "supplier_type": _("Local"), @@ -401,7 +401,7 @@ def create_suppliers(args): if args.get("supplier_contact_" + str(i)): create_contact(args.get("supplier_contact_" + str(i)), - "supplier", supplier) + "supplier", doc.name) except frappe.NameError: pass