reload item_barcode

This commit is contained in:
joezsweet 2018-01-11 11:31:31 +01:00 committed by GitHub
parent 1be684fd87
commit 3aaed03dfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,7 @@ import frappe
def execute():
items_barcode = frappe.db.sql("SELECT name, barcode FROM tabItem WHERE barcode IS NOT NULL", as_dict=1)
frappe.reload_doc("stock", "doctype", "item")
frappe.reload_doc("stock", "doctype", "item_barcode")
for item in items_barcode:
doc = frappe.get_doc("Item", item.get("name"))
if item.get("barcode"):