diff --git a/erpnext/accounts/doctype/cost_center/cost_center.py b/erpnext/accounts/doctype/cost_center/cost_center.py index 348e0228fd..83ad9d23cd 100644 --- a/erpnext/accounts/doctype/cost_center/cost_center.py +++ b/erpnext/accounts/doctype/cost_center/cost_center.py @@ -53,7 +53,7 @@ class DocType: if not self.doc.group_or_ledger: msgprint("Please select Group or Ledger value", raise_exception=1) - if self.doc.cost_center_name != 'Root' and not self.parent_cost_center: + if self.doc.cost_center_name != 'Root' and not self.doc.parent_cost_center: msgprint("Please enter parent cost center", raise_exception=1) #-------------------------------------------------------------------------