added validation that abbreviation should not be more than 5 characters when creating company

This commit is contained in:
Anand Doshi 2012-09-19 12:12:07 +05:30
parent 06f4c1a55f
commit 1953f04e68

View File

@ -37,6 +37,11 @@ convert_to_lists = webnotes.conn.convert_to_lists
class DocType:
def __init__(self,d,dl):
self.doc, self.doclist = d,dl
def validate(self):
if self.doc.__islocal and len(self.doc.abbr) > 5:
webnotes.msgprint("Abbreviation cannot have more than 5 characters",
raise_exception=1)
# Create default accounts
# ---------------------------------------------------