From 825e053e6693cca9f5002a7baab13198a598a758 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 20 Apr 2017 08:50:27 +0530 Subject: [PATCH] Fixed project_copied_from patch --- erpnext/patches/v8_0/set_project_copied_from.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/erpnext/patches/v8_0/set_project_copied_from.py b/erpnext/patches/v8_0/set_project_copied_from.py index be589014ac..d4287978cf 100644 --- a/erpnext/patches/v8_0/set_project_copied_from.py +++ b/erpnext/patches/v8_0/set_project_copied_from.py @@ -2,8 +2,10 @@ from __future__ import unicode_literals import frappe def execute(): - frappe.db.sql(''' - UPDATE `tabProject` - SET copied_from=name - WHERE copied_from is NULL - ''') \ No newline at end of file + frappe.reload_doctype("Project") + + frappe.db.sql(''' + UPDATE `tabProject` + SET copied_from=name + WHERE copied_from is NULL + ''') \ No newline at end of file