fix(item): fix patch for barcode childtable migration in item (#18069)
* fix(item): fix patch for barcode childtable migration in item (cherry picked from commit b2c43ee2d91599038f7bdf2038bbc4c4e7b36285) * fix(item): fixing broken patch item_barcode_childtable_migrate (cherry picked from commit beca677276e0b5b143cd6d1d08efa8529663f60c)
This commit is contained in:
parent
9dd7d3ebb3
commit
e6236094a6
@ -594,7 +594,7 @@ erpnext.patches.v11_1.make_job_card_time_logs
|
||||
erpnext.patches.v12_0.rename_pricing_rule_child_doctypes
|
||||
erpnext.patches.v12_0.move_target_distribution_from_parent_to_child
|
||||
erpnext.patches.v12_0.stock_entry_enhancements
|
||||
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.v12_0.move_item_tax_to_item_tax_template
|
||||
erpnext.patches.v11_1.set_variant_based_on
|
||||
erpnext.patches.v11_1.woocommerce_set_creation_user
|
||||
|
@ -8,8 +8,10 @@ import frappe
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc("stock", "doctype", "item_barcode")
|
||||
if frappe.get_all("Item Barcode", limit=1): return
|
||||
if "barcode" not in frappe.db.get_table_columns("Item"): return
|
||||
|
||||
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")
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user