[minor] add abbr if missing
This commit is contained in:
parent
40cf3db0b1
commit
859843687e
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user