From bad13369d44df55ca6474ca6cd57e56ead6111bf Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 27 Jan 2016 18:58:21 +0530 Subject: [PATCH] [minor] added abbreviate function in company --- erpnext/setup/doctype/company/company.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index 29dee1e30ab..01e5742c2a2 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -166,6 +166,9 @@ class Company(Document): frappe.defaults.clear_cache() + def abbreviate(self): + self.abbr = ''.join([c[0].upper() for c in self.name.split()]) + def on_trash(self): """ Trash accounts and cost centers for this company if no gl entry exists