From d77fac113fe5783558fd8f2ed77293c35fbdaf3e Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Fri, 24 Feb 2017 14:44:59 +0530 Subject: [PATCH] Make All Assessment Group parent in assessment group tree --- erpnext/patches.txt | 1 + erpnext/patches/v7_2/make_all_assessment_group.py | 13 +++++++++++++ .../doctype/assessment_group/assessment_group.json | 12 ++++++++++-- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 erpnext/patches/v7_2/make_all_assessment_group.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 434105719b..59b2ca07aa 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -377,3 +377,4 @@ erpnext.patches.v7_2.arrear_leave_encashment_as_salary_component erpnext.patches.v7_2.rename_att_date_attendance erpnext.patches.v7_2.update_attendance_docstatus erpnext.patches.v7_2.move_dates_from_salary_structure_to_employee +erpnext.patches.v7_2.make_all_assessment_group diff --git a/erpnext/patches/v7_2/make_all_assessment_group.py b/erpnext/patches/v7_2/make_all_assessment_group.py new file mode 100644 index 0000000000..769e503f6d --- /dev/null +++ b/erpnext/patches/v7_2/make_all_assessment_group.py @@ -0,0 +1,13 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + if not frappe.db.exists({"doctype": "Assessment Group","assessment_group_name": "All Assessment Groups"}): + doc = frappe.new_doc("Assessment Group") + doc.assessment_group_name = "All Assessment Groups" + doc.is_group = 1 + doc.flags.ignore_mandatory = True + doc.save() \ No newline at end of file diff --git a/erpnext/schools/doctype/assessment_group/assessment_group.json b/erpnext/schools/doctype/assessment_group/assessment_group.json index 55b5ee7324..3235120bac 100644 --- a/erpnext/schools/doctype/assessment_group/assessment_group.json +++ b/erpnext/schools/doctype/assessment_group/assessment_group.json @@ -22,6 +22,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Assessment Group Name", @@ -50,6 +51,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Is Group", @@ -78,6 +80,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "length": 0, @@ -105,6 +108,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "Parent Assessment Group", @@ -118,7 +122,7 @@ "read_only": 0, "remember_last_selected_value": 0, "report_hide": 0, - "reqd": 0, + "reqd": 1, "search_index": 0, "set_only_once": 0, "unique": 0 @@ -134,6 +138,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "lft", @@ -162,6 +167,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "rgt", @@ -190,6 +196,7 @@ "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, + "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, "label": "old_parent", @@ -219,7 +226,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-02-15 12:44:47.198945", + "modified": "2017-02-24 15:18:54.725368", "modified_by": "Administrator", "module": "Schools", "name": "Assessment Group", @@ -250,6 +257,7 @@ "quick_entry": 1, "read_only": 0, "read_only_onload": 0, + "show_name_in_global_search": 0, "sort_field": "modified", "sort_order": "DESC", "track_changes": 0,