Patch for renaming evaluation criteria

This commit is contained in:
Neil Trini Lasrado 2017-02-01 19:32:28 +05:30
parent 749516c22d
commit 4aabe61197
2 changed files with 25 additions and 0 deletions

View File

@ -369,3 +369,4 @@ erpnext.patches.v7_2.mark_students_active
erpnext.patches.v7_2.set_null_value_to_fields
erpnext.patches.v7_2.update_guardian_name_in_student_master
erpnext.patches.v7_2.update_abbr_in_salary_slips
erpnext.patches.v7_2.rename_evaluation_criteria

View File

@ -0,0 +1,24 @@
import frappe
from frappe.model.utils.rename_field import rename_field
def execute():
frappe.rename_doc("DocType", "Evaluation Criteria", "Assessment Criteria", force=True)
frappe.reload_doc("schools", "doctype", "assessment_criteria")
rename_field("Assessment Criteria", "evaluation_criteria", "assessment_criteria")
frappe.rename_doc("DocType", "Assessment Evaluation Criteria", "Assessment Plan Criteria", force=True)
frappe.reload_doc("schools", "doctype", "assessment_plan_criteria")
rename_field("Assessment Plan Criteria", "evaluation_criteria", "assessment_criteria")
frappe.reload_doc("schools", "doctype", "assessment_plan")
rename_field("Assessment Plan", "evaluation_criterias", "assessment_criteria")
frappe.reload_doc("schools", "doctype", "assessment_result_detail")
rename_field("Assessment Result Detail", "evaluation_criteria", "assessment_criteria")
frappe.rename_doc("DocType", "Course Evaluation Criteria", "Course Assessment Criteria", force=True)
frappe.reload_doc("schools", "doctype", "course_assessment_criteria")
rename_field("Course Assessment Criteria", "evaluation_criteria", "assessment_criteria")
frappe.reload_doc("schools", "doctype", "course")
rename_field("Course", "evaluation_criterias", "assessment_criteria")