966f141f62
* renaming for the docs, demo data and patch * changes in the doctypes and reports * rename the config file * Few name changes in messages and license * rename the school settings to education settings * changes in the documentation * added the setup file for the fixtures * corrected the ui tests file path * fix the codacy * add the patch for renaming few doctypes and fields * changes in the patch
29 lines
1.0 KiB
Python
29 lines
1.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
|
|
# For license information, please see license.txt
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
import frappe
|
|
from erpnext.setup.utils import insert_record
|
|
|
|
|
|
def setup_education():
|
|
if frappe.db.exists('Academic Year', '2015-16'):
|
|
# already setup
|
|
return
|
|
create_academic_sessions()
|
|
|
|
def create_academic_sessions():
|
|
data = [
|
|
{"doctype": "Academic Year", "academic_year_name": "2015-16"},
|
|
{"doctype": "Academic Year", "academic_year_name": "2016-17"},
|
|
{"doctype": "Academic Year", "academic_year_name": "2017-18"},
|
|
{"doctype": "Academic Year", "academic_year_name": "2018-19"},
|
|
{"doctype": "Academic Term", "academic_year": "2016-17", "term_name": "Semester 1"},
|
|
{"doctype": "Academic Term", "academic_year": "2016-17", "term_name": "Semester 2"},
|
|
{"doctype": "Academic Term", "academic_year": "2017-18", "term_name": "Semester 1"},
|
|
{"doctype": "Academic Term", "academic_year": "2017-18", "term_name": "Semester 2"}
|
|
]
|
|
insert_record(data)
|