mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-07 20:42:50 +00:00
fix: setup fails to set abbr to departments
(cherry picked from commit debe868950)
This commit is contained in:
@@ -32,8 +32,7 @@ class Department(NestedSet):
|
|||||||
nsm_parent_field = "parent_department"
|
nsm_parent_field = "parent_department"
|
||||||
|
|
||||||
def autoname(self):
|
def autoname(self):
|
||||||
root = get_root_of("Department")
|
if self.company:
|
||||||
if root and self.department_name != root:
|
|
||||||
self.name = get_abbreviated_name(self.department_name, self.company)
|
self.name = get_abbreviated_name(self.department_name, self.company)
|
||||||
else:
|
else:
|
||||||
self.name = self.department_name
|
self.name = self.department_name
|
||||||
|
|||||||
Reference in New Issue
Block a user