From 364856b7c56c037ce6793845517d1c98a973c25b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 1 Feb 2022 22:26:03 +0530 Subject: [PATCH] fix: patch for migrating cost center allocations --- erpnext/patches/v14_0/migrate_cost_center_allocations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches/v14_0/migrate_cost_center_allocations.py b/erpnext/patches/v14_0/migrate_cost_center_allocations.py index 3d217d89e2f..c4f097fdd92 100644 --- a/erpnext/patches/v14_0/migrate_cost_center_allocations.py +++ b/erpnext/patches/v14_0/migrate_cost_center_allocations.py @@ -27,7 +27,7 @@ def create_new_cost_center_allocation_records(cc_allocations): cca.submit() def get_existing_cost_center_allocations(): - if not frappe.get_meta("Cost Center").has_field("enable_distributed_cost_center"): + if not frappe.db.exists("DocType", "Distributed Cost Center"): return par = frappe.qb.DocType("Cost Center")