From 2141bfab899b4b150e573569f9c2b2c3e421ab53 Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Mon, 4 Jun 2018 16:36:12 +0530 Subject: [PATCH] [patch][update] naming_series field in member patch --- erpnext/patches.txt | 2 +- erpnext/patches/v11_0/rename_members_with_naming_series.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index b42c45dcf3..79bbf359aa 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -544,4 +544,4 @@ erpnext.patches.v11_0.refactor_erpnext_shopify erpnext.patches.v11_0.move_item_defaults_to_child_table_for_multicompany erpnext.patches.v11_0.rename_overproduction_percent_field erpnext.patches.v10_0.update_status_in_purchase_receipt -erpnext.patches.v11_0.rename_members_with_naming_series +erpnext.patches.v11_0.rename_members_with_naming_series #04-06-2018 diff --git a/erpnext/patches/v11_0/rename_members_with_naming_series.py b/erpnext/patches/v11_0/rename_members_with_naming_series.py index ddb5517084..9b85e68be5 100644 --- a/erpnext/patches/v11_0/rename_members_with_naming_series.py +++ b/erpnext/patches/v11_0/rename_members_with_naming_series.py @@ -8,3 +8,5 @@ def execute(): for member in old_named_members: current_index += 1 frappe.rename_doc("Member", member["name"], "MEM-" + str(current_index).zfill(5)) + + frappe.db.sql("""update `tabMember` set naming_series = 'MEM-'""")