mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 08:35:00 +00:00
fix(item): fix patch for barcode childtable migration in item (#18069)
* fix(item): fix patch for barcode childtable migration in item (cherry picked from commitb2c43ee2d9) * fix(item): fixing broken patch item_barcode_childtable_migrate (cherry picked from commitbeca677276)
This commit is contained in:
committed by
Nabin Hait
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")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user