From fde6f13b4be9ed7c6d5358f15d325797a0449e64 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 21 Jan 2022 15:15:11 +0530 Subject: [PATCH] fix: cannot cancel jv after migrating from v12 (#29391) --- erpnext/patches.txt | 1 + .../v13_0/delete_bank_reconciliation_detail.py | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 erpnext/patches/v13_0/delete_bank_reconciliation_detail.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 5d937490b96..40ca9e0e9aa 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -343,3 +343,4 @@ erpnext.patches.v13_0.convert_to_website_item_in_item_card_group_template erpnext.patches.v13_0.agriculture_deprecation_warning erpnext.patches.v13_0.update_maintenance_schedule_field_in_visit erpnext.patches.v13_0.hospitality_deprecation_warning +erpnext.patches.v13_0.delete_bank_reconciliation_detail 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 00000000000..75953b0e304 --- /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)