From 04d64567ef36073f8b62c6b6d1ff66b90f2fb30c Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Wed, 19 Jan 2022 19:37:55 +0530 Subject: [PATCH] fix: cannot cancel jv after migrating from v12 --- erpnext/patches.txt | 3 ++- .../v13_0/delete_bank_reconciliation_detail.py | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 erpnext/patches/v13_0/delete_bank_reconciliation_detail.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 1f83c4fed7..34899e4ca2 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -327,4 +327,5 @@ erpnext.patches.v13_0.agriculture_deprecation_warning erpnext.patches.v14_0.delete_agriculture_doctypes erpnext.patches.v13_0.update_exchange_rate_settings erpnext.patches.v14_0.rearrange_company_fields -erpnext.patches.v14_0.update_leave_notification_template \ No newline at end of file +erpnext.patches.v14_0.update_leave_notification_template +erpnext.patches.v13_0.delete_bank_reconciliation_detail \ No newline at end of file diff --git a/erpnext/patches/v13_0/delete_bank_reconciliation_detail.py b/erpnext/patches/v13_0/delete_bank_reconciliation_detail.py new file mode 100644 index 0000000000..75953b0e30 --- /dev/null +++ b/erpnext/patches/v13_0/delete_bank_reconciliation_detail.py @@ -0,0 +1,13 @@ +# Copyright (c) 2019, Frappe and Contributors +# License: GNU General Public License v3. See license.txt + + +import frappe + + +def execute(): + + if frappe.db.exists('DocType', 'Bank Reconciliation Detail') and \ + frappe.db.exists('DocType', 'Bank Clearance Detail'): + + frappe.delete_doc("DocType", 'Bank Reconciliation Detail', force=1)