diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 32c0cc50b2..df3d772a2b 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -90,7 +90,7 @@ erpnext.patches.v4_2.update_requested_and_ordered_qty erpnext.patches.v4_2.party_model erpnext.patches.v4_4.make_email_accounts execute:frappe.delete_doc("DocType", "Contact Control") -erpnext.patches.v4_2.recalculate_bom_costs +erpnext.patches.v4_2.reset_bom_costs erpnext.patches.v5_0.update_frozen_accounts_permission_role erpnext.patches.v5_0.update_dn_against_doc_fields execute:frappe.db.sql("update `tabMaterial Request` set material_request_type = 'Material Transfer' where material_request_type = 'Transfer'") diff --git a/erpnext/patches/v4_2/recalculate_bom_costs.py b/erpnext/patches/v4_2/reset_bom_costs.py similarity index 65% rename from erpnext/patches/v4_2/recalculate_bom_costs.py rename to erpnext/patches/v4_2/reset_bom_costs.py index 37f04131b0..49f0b2ec6d 100644 --- a/erpnext/patches/v4_2/recalculate_bom_costs.py +++ b/erpnext/patches/v4_2/reset_bom_costs.py @@ -6,9 +6,7 @@ import frappe def execute(): frappe.reload_doc('manufacturing', 'doctype', 'bom_operation') - for d in frappe.db.sql("""select bom.name from `tabBOM` bom where bom.docstatus < 2 and - exists(select bom_op.name from `tabBOM Operation` bom_op where - bom.name = bom_op.parent and bom_op.fixed_cycle_cost IS NOT NULL)""", as_dict=1): + for d in frappe.db.sql("""select name from `tabBOM` where docstatus < 2""", as_dict=1): try: bom = frappe.get_doc('BOM', d.name) bom.ignore_validate_update_after_submit = True