From c711445b914257aedb3df3922685b3d25a7203a5 Mon Sep 17 00:00:00 2001 From: Manas Solanki Date: Wed, 21 Mar 2018 10:12:27 +0530 Subject: [PATCH] add the student as party type (#13348) --- erpnext/patches.txt | 1 + erpnext/patches/v10_0/set_student_party_type.py | 7 +++++++ erpnext/setup/setup_wizard/operations/install_fixtures.py | 1 + 3 files changed, 9 insertions(+) create mode 100644 erpnext/patches/v10_0/set_student_party_type.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 512e440a93..1df001fc66 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -496,3 +496,4 @@ erpnext.patches.v10_0.update_territory_and_customer_group erpnext.patches.v10_0.update_warehouse_address_details erpnext.patches.v10_0.update_reserved_qty_for_purchase_order erpnext.patches.v10_0.update_hub_connector_domain +erpnext.patches.v10_0.set_student_party_type diff --git a/erpnext/patches/v10_0/set_student_party_type.py b/erpnext/patches/v10_0/set_student_party_type.py new file mode 100644 index 0000000000..6ac1451623 --- /dev/null +++ b/erpnext/patches/v10_0/set_student_party_type.py @@ -0,0 +1,7 @@ +import frappe + +def execute(): + if not frappe.db.exists("Party Type", "Student"): + party = frappe.new_doc("Party Type") + party.party_type = "Student" + party.save() diff --git a/erpnext/setup/setup_wizard/operations/install_fixtures.py b/erpnext/setup/setup_wizard/operations/install_fixtures.py index dce3c288b8..376ef29889 100644 --- a/erpnext/setup/setup_wizard/operations/install_fixtures.py +++ b/erpnext/setup/setup_wizard/operations/install_fixtures.py @@ -216,6 +216,7 @@ def install(country=None): {'doctype': "Party Type", "party_type": "Supplier"}, {'doctype': "Party Type", "party_type": "Employee"}, {'doctype': "Party Type", "party_type": "Member"}, + {'doctype': "Party Type", "party_type": "Student"}, {'doctype': "Opportunity Type", "name": "Hub"}, {'doctype': "Opportunity Type", "name": _("Sales")},