We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10be8f1 commit b15db05Copy full SHA for b15db05
1 file changed
erpnext/setup/doctype/department/department.py
@@ -32,8 +32,7 @@ class Department(NestedSet):
32
nsm_parent_field = "parent_department"
33
34
def autoname(self):
35
- root = get_root_of("Department")
36
- if root and self.department_name != root:
+ if self.company:
37
self.name = get_abbreviated_name(self.department_name, self.company)
38
else:
39
self.name = self.department_name
0 commit comments