[fix] [minor] lead validate
This commit is contained in:
parent
6ba5708a6e
commit
1c8ec406ae
@ -39,17 +39,14 @@ class DocType(SellingController):
|
|||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
if self.doc.status == 'Lead Lost' and not self.doc.order_lost_reason:
|
if self.doc.status == 'Lead Lost' and not self.doc.order_lost_reason:
|
||||||
msgprint("Please Enter Lost Reason under More Info section")
|
webnotes.throw("Please Enter Lost Reason under More Info section")
|
||||||
raise Exception
|
|
||||||
|
|
||||||
if self.doc.source == 'Campaign' and not self.doc.campaign_name and session['user'] != 'Guest':
|
if self.doc.source == 'Campaign' and not self.doc.campaign_name and session['user'] != 'Guest':
|
||||||
msgprint("Please specify campaign name")
|
webnotes.throw("Please specify campaign name")
|
||||||
raise Exception
|
|
||||||
|
|
||||||
if self.doc.email_id:
|
if self.doc.email_id:
|
||||||
if not validate_email_add(self.doc.email_id):
|
if not validate_email_add(self.doc.email_id):
|
||||||
msgprint('Please enter valid email id.')
|
webnotes.throw('Please enter valid email id.')
|
||||||
raise Exception
|
|
||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
self.check_email_id_is_unique()
|
self.check_email_id_is_unique()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user