From 364856b7c56c037ce6793845517d1c98a973c25b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 1 Feb 2022 22:26:03 +0530 Subject: [PATCH 1/2] 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 3d217d89e2..c4f097fdd9 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") From 81d1ad6059a41f72afcbed11ec45d77331c7b8aa Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 1 Feb 2022 22:26:39 +0530 Subject: [PATCH 2/2] fix: Allocation percentage fieldtype changed to percent --- .../cost_center_allocation_percentage.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/cost_center_allocation_percentage/cost_center_allocation_percentage.json b/erpnext/accounts/doctype/cost_center_allocation_percentage/cost_center_allocation_percentage.json index 4b871ae88d..7e50962a87 100644 --- a/erpnext/accounts/doctype/cost_center_allocation_percentage/cost_center_allocation_percentage.json +++ b/erpnext/accounts/doctype/cost_center_allocation_percentage/cost_center_allocation_percentage.json @@ -1,7 +1,7 @@ { "actions": [], "allow_rename": 1, - "creation": "2022-01-03 18:10:11.697198", + "creation": "2022-01-13 20:07:30.096306", "doctype": "DocType", "editable_grid": 1, "engine": "InnoDB", @@ -20,7 +20,7 @@ }, { "fieldname": "percentage", - "fieldtype": "Int", + "fieldtype": "Percent", "in_list_view": 1, "label": "Percentage (%)", "reqd": 1 @@ -29,7 +29,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2022-01-03 18:10:20.029821", + "modified": "2022-02-01 22:22:31.589523", "modified_by": "Administrator", "module": "Accounts", "name": "Cost Center Allocation Percentage",