fix(item): patch to rename duplicate item_code values to name (#21622)
Co-authored-by: Mangesh-Khairnar <mkhairnar10@gmail.com>
This commit is contained in:
parent
9de26f6648
commit
c759e17900
@ -495,6 +495,7 @@ erpnext.patches.v10_0.rename_offer_letter_to_job_offer
|
|||||||
execute:frappe.delete_doc('DocType', 'Production Planning Tool', ignore_missing=True)
|
execute:frappe.delete_doc('DocType', 'Production Planning Tool', ignore_missing=True)
|
||||||
erpnext.patches.v10_0.migrate_daily_work_summary_settings_to_daily_work_summary_group # 24-12-2018
|
erpnext.patches.v10_0.migrate_daily_work_summary_settings_to_daily_work_summary_group # 24-12-2018
|
||||||
erpnext.patches.v10_0.add_default_cash_flow_mappers
|
erpnext.patches.v10_0.add_default_cash_flow_mappers
|
||||||
|
erpnext.patches.v11_0.rename_duplicate_item_code_values
|
||||||
erpnext.patches.v11_0.make_quality_inspection_template
|
erpnext.patches.v11_0.make_quality_inspection_template
|
||||||
erpnext.patches.v10_0.update_status_for_multiple_source_in_po
|
erpnext.patches.v10_0.update_status_for_multiple_source_in_po
|
||||||
erpnext.patches.v10_0.set_auto_created_serial_no_in_stock_entry
|
erpnext.patches.v10_0.set_auto_created_serial_no_in_stock_entry
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
items = []
|
||||||
|
items = frappe.db.sql("""select item_code from `tabItem` group by item_code having count(*) > 1""", as_dict=True)
|
||||||
|
if items:
|
||||||
|
for item in items:
|
||||||
|
frappe.db.sql("""update `tabItem` set item_code=name where item_code = %s""", (item.item_code))
|
Loading…
x
Reference in New Issue
Block a user