[fix] [patch] reload doctype missing in patch

This commit is contained in:
Rushabh Mehta 2016-07-04 11:41:12 +05:30
parent b33df4afe8
commit 4177504860

View File

@ -1,8 +1,8 @@
import frappe
from frappe.utils import cint
def execute():
for data in frappe.db.sql(""" select prevdoc_docname, prevdoc_detail_docname, name
frappe.reload_doctype('Supplier Quotation Item')
for data in frappe.db.sql(""" select prevdoc_docname, prevdoc_detail_docname, name
from `tabSupplier Quotation Item` where prevdoc_docname is not null""", as_dict=True):
frappe.db.set_value("Supplier Quotation Item", data.name, "material_request", data.prevdoc_docname)
frappe.db.set_value("Supplier Quotation Item", data.name, "material_request_item", data.prevdoc_detail_docname)