Merge branch 'master' into develop

This commit is contained in:
mbauskar 2017-09-04 14:50:31 +05:30
commit d32f08f6ec
2 changed files with 4 additions and 1 deletions

View File

@ -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'''

View File

@ -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(self.lead_name))
lead.lead_name = lead.lead_name.split(" ")
lead.first_name = lead.lead_name[0]
lead.last_name = " ".join(lead.lead_name[1:])