patch to migrade barcodes into Item Barcode
This commit is contained in:
parent
43372d3333
commit
dd37ceb707
@ -479,3 +479,4 @@ erpnext.patches.v9_2.rename_net_weight_in_item_master
|
|||||||
erpnext.patches.v9_2.delete_process_payroll
|
erpnext.patches.v9_2.delete_process_payroll
|
||||||
erpnext.patches.v10_0.add_agriculture_domain
|
erpnext.patches.v10_0.add_agriculture_domain
|
||||||
erpnext.patches.v10_0.add_non_profit_domain
|
erpnext.patches.v10_0.add_non_profit_domain
|
||||||
|
erpnext.patches.v10_0item_barcode_childtable_migrate
|
||||||
|
15
erpnext/patches/v10_0/item_barcode_childtable_migrate.py
Normal file
15
erpnext/patches/v10_0/item_barcode_childtable_migrate.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Copyright (c) 2017, Frappe and Contributors
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
items_barcode = frappe.db.sql("SELECT name, barcode FROM tabItem WHERE barcode IS NOT NULL", as_dict=1)
|
||||||
|
|
||||||
|
for item in items_barcode:
|
||||||
|
doc = frappe.get_doc("Item", item.name)
|
||||||
|
doc.append("barcodes", {"barcode": item.get("barcode")})
|
||||||
|
doc.save()
|
Loading…
Reference in New Issue
Block a user