From e5a6f3ff21f84898045acb1b2cfde8e4c901dfa9 Mon Sep 17 00:00:00 2001 From: l0gesh29 Date: Wed, 23 Jul 2025 15:46:08 +0530 Subject: [PATCH] fix: update subscription details patch (cherry picked from commit c7b1379a7f2cbc8b852330dd7e627acd7c86965c) # Conflicts: # erpnext/patches.txt # erpnext/patches/v14_0/update_subscription_details.py --- erpnext/patches.txt | 6 ++++++ .../v14_0/update_subscription_details.py | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 erpnext/patches/v14_0/update_subscription_details.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 1d051fd2489..5359f3e1085 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -333,6 +333,12 @@ erpnext.patches.v13_0.update_docs_link erpnext.patches.v14_0.enable_all_leads execute:frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0) erpnext.patches.v14_0.update_reference_type_in_journal_entry_accounts +<<<<<<< HEAD +======= +erpnext.patches.v14_0.update_subscription_details # 23-07-2025 +execute:frappe.delete_doc("Report", "Tax Detail", force=True) +erpnext.patches.v15_0.enable_all_leads +>>>>>>> c7b1379a7f (fix: update subscription details patch) erpnext.patches.v14_0.update_company_in_ldc erpnext.patches.v14_0.set_packed_qty_in_draft_delivery_notes erpnext.patches.v14_0.cleanup_workspaces diff --git a/erpnext/patches/v14_0/update_subscription_details.py b/erpnext/patches/v14_0/update_subscription_details.py new file mode 100644 index 00000000000..bd1a654c7c2 --- /dev/null +++ b/erpnext/patches/v14_0/update_subscription_details.py @@ -0,0 +1,18 @@ +import frappe + + +def execute(): + subscription_invoices = frappe.get_all( + "Subscription Invoice", fields=["document_type", "invoice", "parent"] + ) + + for subscription_invoice in subscription_invoices: + frappe.db.set_value( + subscription_invoice.document_type, + subscription_invoice.invoice, + "subscription", + subscription_invoice.parent, + update_modified=False, + ) + + frappe.delete_doc_if_exists("DocType", "Subscription Invoice", force=1)