From c83802fae135a7bec5446c0767b18bf6e4b678e3 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 16 Feb 2016 13:29:59 +0530 Subject: [PATCH] [fix] Setup Wizard: use correct customer, supplier name in create contact. Fixes #4804. --- erpnext/setup/setup_wizard/setup_wizard.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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