fix patch, reload doc

This commit is contained in:
joezsweet 2018-01-11 08:44:59 +01:00 committed by GitHub
parent 9116666288
commit b6fb8d2143
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,8 @@ 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")
for item in items_barcode:
doc = frappe.get_doc("Item", item.get("name"))
if item.get("barcode"):