From 3139973662f1e6426dc8fc1fb678077bd1e9264b Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 3 Sep 2013 15:41:31 +0530 Subject: [PATCH] [fix] [minor] quotation to sales order, if not able to create customer, show message --- selling/doctype/quotation/quotation.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/selling/doctype/quotation/quotation.py b/selling/doctype/quotation/quotation.py index 6ac254298c5..588d8d6e1f3 100644 --- a/selling/doctype/quotation/quotation.py +++ b/selling/doctype/quotation/quotation.py @@ -276,8 +276,9 @@ def _make_customer(source_name, ignore_permissions=False): customer.doc.name += "-" + lead_name customer.insert() return customer - elif webnotes.MandatoryError: - msgprint(_("You will need to make Customer from Lead") + (" - %s" % lead_name)) - return else: raise e + except webnotes.MandatoryError: + from webnotes.utils import get_url_to_form + webnotes.throw(_("Before proceeding, please create Customer from Lead") + \ + (" - %s" % get_url_to_form("Lead", lead_name)))