From 2f4a9f283dab89815661d7f8dae321797487147b Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 31 Jul 2025 15:23:14 +0530 Subject: [PATCH 1/2] fix: failing subcontracting patch (cherry picked from commit bb434199441111f79b6e816b98a1ce0751230420) --- .../repost_gl_entries_with_no_account_subcontracting.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/patches/v15_0/repost_gl_entries_with_no_account_subcontracting.py b/erpnext/patches/v15_0/repost_gl_entries_with_no_account_subcontracting.py index b2208667ea6..e7394f1071c 100644 --- a/erpnext/patches/v15_0/repost_gl_entries_with_no_account_subcontracting.py +++ b/erpnext/patches/v15_0/repost_gl_entries_with_no_account_subcontracting.py @@ -19,7 +19,7 @@ def execute(): if not item.cost_center: item.db_set("cost_center", cost_center) - doc.docstatus = 2 - doc.make_gl_entries_on_cancel() - doc.docstatus = 1 - doc.make_gl_entries() + doc.docstatus = 2 + doc.make_gl_entries_on_cancel() + doc.docstatus = 1 + doc.make_gl_entries() From ed927a2147b792c1dfc460bdc4eb4d3f90e28b8c Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 31 Jul 2025 16:00:35 +0530 Subject: [PATCH 2/2] chore: add date so patch can rerun --- erpnext/patches.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 362486a97bb..7bd30f81bc3 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -415,5 +415,5 @@ erpnext.patches.v15_0.set_company_on_pos_inv_merge_log erpnext.patches.v15_0.rename_price_list_to_buying_price_list erpnext.patches.v15_0.patch_missing_buying_price_list_in_material_request erpnext.patches.v15_0.remove_sales_partner_from_consolidated_sales_invoice -erpnext.patches.v15_0.repost_gl_entries_with_no_account_subcontracting +erpnext.patches.v15_0.repost_gl_entries_with_no_account_subcontracting #2025-07-31 execute:frappe.db.set_single_value("Accounts Settings", "fetch_valuation_rate_for_internal_transaction", 1)