diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index cf8b793bfa..6c6eb3af7e 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -91,7 +91,7 @@ class Customer(TransactionBase): lead = frappe.db.get_value("Lead", self.lead_name, ["lead_name", "email_id", "phone", "mobile_no", "gender", "salutation"], as_dict=True) if not lead.lead_name: - frappe.throw(_("Please mention the Lead Name in Lead {0}").format(lead.name)) + frappe.throw(_("Please mention the Lead Name in Lead {0}").format(self.lead_name)) lead.lead_name = lead.lead_name.split(" ") lead.first_name = lead.lead_name[0]