diff --git a/erpnext/patches/v7_0/update_prevdoc_values_for_supplier_quotation_item.py b/erpnext/patches/v7_0/update_prevdoc_values_for_supplier_quotation_item.py index 964b657cc0..1c41ec8e80 100644 --- a/erpnext/patches/v7_0/update_prevdoc_values_for_supplier_quotation_item.py +++ b/erpnext/patches/v7_0/update_prevdoc_values_for_supplier_quotation_item.py @@ -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) \ No newline at end of file