[fix] Setup Wizard: use correct customer, supplier name in create contact. Fixes #4804.
This commit is contained in:
parent
efef236fdf
commit
c83802fae1
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user