fix(item): fix patch for barcode childtable migration in item (#18066)
* fix(item): fix patch for barcode childtable migration in item * fix(item): fix patch for barcode childtable migration in item > adding condition so this patch will not execute for the site where it was executed perfectly the first time
This commit is contained in:
committed by
Nabin Hait
parent
10878c4d0e
commit
b2c43ee2d9
@@ -586,7 +586,7 @@ erpnext.patches.v11_0.add_permissions_in_gst_settings
|
||||
erpnext.patches.v11_1.setup_guardian_role
|
||||
execute:frappe.delete_doc('DocType', 'Notification Control')
|
||||
erpnext.patches.v11_0.remove_barcodes_field_from_copy_fields_to_variants
|
||||
erpnext.patches.v10_0.item_barcode_childtable_migrate # 16-02-2019
|
||||
erpnext.patches.v10_0.item_barcode_childtable_migrate # 16-02-2019 #25-06-2019
|
||||
erpnext.patches.v11_0.make_italian_localization_fields # 26-03-2019
|
||||
erpnext.patches.v11_1.make_job_card_time_logs
|
||||
erpnext.patches.v11_1.set_variant_based_on
|
||||
|
||||
@@ -7,9 +7,10 @@ import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
if frappe.get_all("Item Barcode", limit=1): return
|
||||
frappe.reload_doc("stock", "doctype", "item_barcode")
|
||||
|
||||
items_barcode = frappe.get_all('Item', ['name', 'barcode'], { 'barcode': ('!=', '') })
|
||||
items_barcode = frappe.db.sql("select name, barcode from tabItem where barcode is not null", as_dict=True)
|
||||
frappe.reload_doc("stock", "doctype", "item")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user