mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
Rename schools to Education (#11524)
* 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
This commit is contained in:
committed by
Nabin Hait
parent
acccdb3890
commit
966f141f62
@@ -2,6 +2,7 @@ from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe import _
|
||||
from erpnext.setup.utils import insert_record
|
||||
|
||||
def setup_healthcare():
|
||||
if frappe.db.exists('Medical Department', 'Cardiology'):
|
||||
@@ -259,17 +260,3 @@ def create_sensitivity():
|
||||
{"doctype": "Sensitivity", "sensitivity": _("Intermediate")}
|
||||
]
|
||||
insert_record(records)
|
||||
|
||||
def insert_record(records):
|
||||
for r in records:
|
||||
doc = frappe.new_doc(r.get("doctype"))
|
||||
doc.update(r)
|
||||
try:
|
||||
doc.insert(ignore_permissions=True)
|
||||
except frappe.DuplicateEntryError, e:
|
||||
# pass DuplicateEntryError and continue
|
||||
if e.args and e.args[0]==doc.doctype and e.args[1]==doc.name:
|
||||
# make sure DuplicateEntryError is for the exact same doc and not a related doc
|
||||
pass
|
||||
else:
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user