fix(rename_bank_reconcilliation): do not delete doc after renaming (#22014)

This commit is contained in:
sahil28297 2020-05-28 18:32:34 +05:30 committed by GitHub
parent 354baf0c5e
commit a0f061abd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,9 +8,6 @@ def execute():
if frappe.db.table_exists("Bank Reconciliation"): if frappe.db.table_exists("Bank Reconciliation"):
frappe.rename_doc('DocType', 'Bank Reconciliation', 'Bank Clearance', force=True) frappe.rename_doc('DocType', 'Bank Reconciliation', 'Bank Clearance', force=True)
frappe.reload_doc('Accounts', 'doctype', 'Bank Clearance') frappe.reload_doc('Accounts', 'doctype', 'Bank Clearance')
frappe.rename_doc('DocType', 'Bank Reconciliation Detail', 'Bank Clearance Detail', force=True) frappe.rename_doc('DocType', 'Bank Reconciliation Detail', 'Bank Clearance Detail', force=True)
frappe.reload_doc('Accounts', 'doctype', 'Bank Clearance Detail') frappe.reload_doc('Accounts', 'doctype', 'Bank Clearance Detail')
frappe.delete_doc("DocType", "Bank Reconciliation")
frappe.delete_doc("DocType", "Bank Reconciliation Detail")