From d6922b2de34501e20504cc85db57e9de371a18a6 Mon Sep 17 00:00:00 2001 From: Makarand Bauskar Date: Fri, 1 Sep 2017 18:45:40 +0530 Subject: [PATCH 1/3] [hotfix] lead name should available before creating new customer from quotations (#10642) --- erpnext/selling/doctype/customer/customer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index d797632902..cf8b793bfa 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -90,6 +90,9 @@ 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)) + lead.lead_name = lead.lead_name.split(" ") lead.first_name = lead.lead_name[0] lead.last_name = " ".join(lead.lead_name[1:]) From cf9e986f823bca933059b5072b6fb4ef572875e6 Mon Sep 17 00:00:00 2001 From: Makarand Bauskar Date: Mon, 4 Sep 2017 10:25:37 +0530 Subject: [PATCH 2/3] [hotfix] fixed the invalid variable name lead.name (#10648) --- erpnext/selling/doctype/customer/customer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] From 11cf44986b253a2c0718d888d054b5c9c9983459 Mon Sep 17 00:00:00 2001 From: mbauskar Date: Mon, 4 Sep 2017 15:20:30 +0600 Subject: [PATCH 3/3] bumped to version 8.10.2 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 542743dde2..70ae35a556 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -4,7 +4,7 @@ import inspect import frappe from erpnext.hooks import regional_overrides -__version__ = '8.10.1' +__version__ = '8.10.2' def get_default_company(user=None): '''Get default company for user'''