diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 56aca635a8f..bf3c6291c4a 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -352,8 +352,15 @@ erpnext.patches.v14_0.rename_depreciation_amount_based_on_num_days_in_month_to_d ======= >>>>>>> b5dd0c8630 (chore: remove reconciliation defaults from patch) erpnext.patches.v14_0.add_default_for_repost_settings +<<<<<<< HEAD erpnext.patches.v14_0.create_accounting_dimensions_in_supplier_quotation erpnext.patches.v14_0.update_zero_asset_quantity_field execute:frappe.db.set_single_value("Buying Settings", "project_update_frequency", "Each Transaction") +======= +erpnext.patches.v14_0.clear_reconciliation_values_from_singles +erpnext.patches.v15_0.rename_daily_depreciation_to_depreciation_amount_based_on_num_days_in_month +erpnext.patches.v15_0.rename_depreciation_amount_based_on_num_days_in_month_to_daily_prorata_based +erpnext.patches.v15_0.set_reserved_stock_in_bin +>>>>>>> f31002636b (chore: clear singles table and reconciliation related tables) # below migration patch should always run last erpnext.patches.v14_0.migrate_gl_to_payment_ledger diff --git a/erpnext/patches/v14_0/clear_reconciliation_values_from_singles.py b/erpnext/patches/v14_0/clear_reconciliation_values_from_singles.py new file mode 100644 index 00000000000..c1f5b60a406 --- /dev/null +++ b/erpnext/patches/v14_0/clear_reconciliation_values_from_singles.py @@ -0,0 +1,17 @@ +from frappe import qb + + +def execute(): + """ + Clear `tabSingles` and Payment Reconciliation tables of values + """ + singles = qb.DocType("Singles") + qb.from_(singles).delete().where(singles.doctype == "Payment Reconciliation").run() + doctypes = [ + "Payment Reconciliation Invoice", + "Payment Reconciliation Payment", + "Payment Reconciliation Allocation", + ] + for x in doctypes: + dt = qb.DocType(x) + qb.from_(dt).delete().run()