[minor] add abbr if missing

This commit is contained in:
Rushabh Mehta 2016-07-26 08:23:17 +05:30
parent 40cf3db0b1
commit 859843687e

View File

@ -32,6 +32,9 @@ class Company(Document):
self.validate_currency()
def validate_abbr(self):
if not self.abbr:
self.abbr = ''.join([c[0] for c in self.company_name.split()]).upper()
self.abbr = self.abbr.strip()
if self.get('__islocal') and len(self.abbr) > 5: