From 1c8ec406aec8d108d4025fc04a8a270188cf4f8b Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 29 Aug 2013 13:58:47 +0530 Subject: [PATCH] [fix] [minor] lead validate --- selling/doctype/lead/lead.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/selling/doctype/lead/lead.py b/selling/doctype/lead/lead.py index b2016aa7a9..2bf1aa3845 100644 --- a/selling/doctype/lead/lead.py +++ b/selling/doctype/lead/lead.py @@ -39,17 +39,14 @@ class DocType(SellingController): def validate(self): if self.doc.status == 'Lead Lost' and not self.doc.order_lost_reason: - msgprint("Please Enter Lost Reason under More Info section") - raise Exception + webnotes.throw("Please Enter Lost Reason under More Info section") if self.doc.source == 'Campaign' and not self.doc.campaign_name and session['user'] != 'Guest': - msgprint("Please specify campaign name") - raise Exception + webnotes.throw("Please specify campaign name") if self.doc.email_id: if not validate_email_add(self.doc.email_id): - msgprint('Please enter valid email id.') - raise Exception + webnotes.throw('Please enter valid email id.') def on_update(self): self.check_email_id_is_unique()