diff --git a/erpnext/config/non_profit.py b/erpnext/config/non_profit.py index 9c85ff6afe4..60ca80e8150 100644 --- a/erpnext/config/non_profit.py +++ b/erpnext/config/non_profit.py @@ -11,12 +11,7 @@ def get_data(): "type": "doctype", "name": "Chapter", "description": _("Chapter information."), - }, - { - "type": "doctype", - "name": "Chapter Message", - "description": _("Chapter Message."), - }, + } ] }, { diff --git a/erpnext/domains/non_profit.py b/erpnext/domains/non_profit.py index 8b8754a9b4d..b9683bd558f 100644 --- a/erpnext/domains/non_profit.py +++ b/erpnext/domains/non_profit.py @@ -1,7 +1,13 @@ data = { 'desktop_icons': [ 'Non Profit', - 'Sales Invoice', + 'Member', + 'Donor', + 'Volunteer', + 'Grant Application', + 'Accounts', + 'Buying', + 'HR', 'ToDo' ], 'modules': [ diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 8d82b45325d..60bb6ac6a4e 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -147,7 +147,7 @@ standard_portal_menu_items = [ {"title": _("Fees"), "route": "/fees", "reference_doctype": "Fees", "role":"Student"}, {"title": _("Newsletter"), "route": "/newsletters", "reference_doctype": "Newsletter"}, {"title": _("Admission"), "route": "/admissions", "reference_doctype": "Student Admission"}, - {"title": _("Grant Application"), "route": "/grant-application", "reference_doctype": "Grant Application"}, + {"title": _("Grant Application"), "route": "/grant-application", "reference_doctype": "Grant Application", "role": "Non Profit Portal User"}, {"title": _("Chapter"), "route": "/chapters", "reference_doctype": "Chapter"} ] diff --git a/erpnext/non_profit/doctype/chapter/chapter.json b/erpnext/non_profit/doctype/chapter/chapter.json index af4b91b977e..b5f6ad5acdb 100644 --- a/erpnext/non_profit/doctype/chapter/chapter.json +++ b/erpnext/non_profit/doctype/chapter/chapter.json @@ -13,36 +13,6 @@ "editable_grid": 1, "engine": "InnoDB", "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "title", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Chapter Name", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -386,7 +356,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-12-05 07:04:18.311063", + "modified": "2017-12-06 11:45:54.559482", "modified_by": "Administrator", "module": "Non Profit", "name": "Chapter", diff --git a/erpnext/non_profit/doctype/chapter/templates/chapter_row.html b/erpnext/non_profit/doctype/chapter/templates/chapter_row.html index 050655397a8..67fb0c5631a 100644 --- a/erpnext/non_profit/doctype/chapter/templates/chapter_row.html +++ b/erpnext/non_profit/doctype/chapter/templates/chapter_row.html @@ -1,7 +1,7 @@ {% if doc.published %}
{{ frappe.db.get_value('User', chapter_head, 'full_name') }}
diff --git a/erpnext/non_profit/doctype/chapter_member/chapter_member.json b/erpnext/non_profit/doctype/chapter_member/chapter_member.json
index 6921216becb..ba78a6763ed 100644
--- a/erpnext/non_profit/doctype/chapter_member/chapter_member.json
+++ b/erpnext/non_profit/doctype/chapter_member/chapter_member.json
@@ -56,7 +56,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
- "in_list_view": 0,
+ "in_list_view": 1,
"in_standard_filter": 0,
"label": "Introduction",
"length": 0,
@@ -86,7 +86,7 @@
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
- "in_list_view": 0,
+ "in_list_view": 1,
"in_standard_filter": 0,
"label": "Website URL",
"length": 0,
@@ -144,7 +144,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
- "modified": "2017-11-20 17:41:19.173820",
+ "modified": "2017-12-06 11:33:34.300252",
"modified_by": "Administrator",
"module": "Non Profit",
"name": "Chapter Member",
diff --git a/erpnext/non_profit/doctype/grant_application/grant_application.json b/erpnext/non_profit/doctype/grant_application/grant_application.json
index cadbf13c2f4..2eb20879250 100644
--- a/erpnext/non_profit/doctype/grant_application/grant_application.json
+++ b/erpnext/non_profit/doctype/grant_application/grant_application.json
@@ -3,7 +3,7 @@
"allow_guest_to_view": 1,
"allow_import": 0,
"allow_rename": 0,
- "autoname": "field:email",
+ "autoname": "",
"beta": 0,
"creation": "2017-09-21 12:02:01.206913",
"custom": 0,
@@ -19,7 +19,38 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "title",
+ "fieldname": "applicant_type",
+ "fieldtype": "Select",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Applicant Type",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Individual\nOrganization",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 1,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "applicant_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -49,70 +80,9 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "organization_type",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Organization Type",
- "length": 0,
- "no_copy": 0,
- "options": "Individual\nOrganization",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "company",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Company",
- "length": 0,
- "no_copy": 0,
- "options": "Company",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break_5",
- "fieldtype": "Column Break",
+ "depends_on": "eval:doc.applicant_type=='Organization'",
+ "fieldname": "contact_person",
+ "fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -120,6 +90,7 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
+ "label": "Contact Person",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -170,8 +141,8 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "website_url",
- "fieldtype": "Data",
+ "fieldname": "column_break_5",
+ "fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -179,7 +150,6 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Website URL",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -232,21 +202,52 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "image",
- "fieldtype": "Attach Image",
- "hidden": 1,
+ "fieldname": "website_url",
+ "fieldtype": "Data",
+ "hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Image",
+ "label": "Website URL",
"length": 0,
- "no_copy": 1,
+ "no_copy": 0,
"permlevel": 0,
"precision": "",
- "print_hide": 1,
+ "print_hide": 0,
+ "print_hide_if_no_value": 0,
+ "read_only": 0,
+ "remember_last_selected_value": 0,
+ "report_hide": 0,
+ "reqd": 0,
+ "search_index": 0,
+ "set_only_once": 0,
+ "unique": 0
+ },
+ {
+ "allow_bulk_edit": 0,
+ "allow_on_submit": 0,
+ "bold": 0,
+ "collapsible": 0,
+ "columns": 0,
+ "fieldname": "company",
+ "fieldtype": "Link",
+ "hidden": 0,
+ "ignore_user_permissions": 0,
+ "ignore_xss_filter": 0,
+ "in_filter": 0,
+ "in_global_search": 0,
+ "in_list_view": 0,
+ "in_standard_filter": 0,
+ "label": "Company",
+ "length": 0,
+ "no_copy": 0,
+ "options": "Company",
+ "permlevel": 0,
+ "precision": "",
+ "print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
@@ -436,36 +437,6 @@
"set_only_once": 0,
"unique": 0
},
- {
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "grant_purpose",
- "fieldtype": "Long Text",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Grant Purpose",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
@@ -502,7 +473,7 @@
"collapsible": 0,
"columns": 0,
"fieldname": "amount",
- "fieldtype": "Float",
+ "fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
@@ -520,7 +491,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
@@ -531,7 +502,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "grant_past_record",
+ "fieldname": "has_any_past_grant_record",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -540,7 +511,7 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Past Grant Record",
+ "label": "Has any past Grant Record",
"length": 0,
"no_copy": 0,
"options": "",
@@ -690,7 +661,7 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Assessment Mark ( out of 10 )",
+ "label": "Assessment Mark (Out of 10)",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -720,7 +691,7 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "note",
+ "label": "Note",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -824,74 +795,13 @@
"search_index": 0,
"set_only_once": 0,
"unique": 0
- },
- {
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "default_payable_accounts",
- "fieldtype": "Section Break",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Accounting",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
- },
- {
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "accounts",
- "fieldtype": "Table",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Accounts",
- "length": 0,
- "no_copy": 0,
- "options": "Party Account",
- "permlevel": 0,
- "precision": "",
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "unique": 0
}
],
"has_web_view": 1,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
- "image_field": "image",
+ "image_field": "",
"image_view": 0,
"in_create": 0,
"is_published_field": "published",
@@ -899,7 +809,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-12-05 06:59:50.313267",
+ "modified": "2017-12-06 12:39:57.677899",
"modified_by": "Administrator",
"module": "Non Profit",
"name": "Grant Application",
@@ -935,7 +845,7 @@
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
- "title_field": "",
+ "title_field": "applicant_name",
"track_changes": 1,
"track_seen": 0
}
\ No newline at end of file
diff --git a/erpnext/non_profit/doctype/grant_application/grant_application.py b/erpnext/non_profit/doctype/grant_application/grant_application.py
index b5b52b9d153..f0123b2e494 100644
--- a/erpnext/non_profit/doctype/grant_application/grant_application.py
+++ b/erpnext/non_profit/doctype/grant_application/grant_application.py
@@ -15,7 +15,7 @@ class GrantApplication(WebsiteGenerator):
)
def validate(self):
- if not self.route: #pylint: disable=E0203
+ if not self.route: #pylint: disable=E0203
self.route = 'grant-application/' + self.scrub(self.name)
def onload(self):
@@ -34,9 +34,8 @@ def get_list_context(context):
context.no_breadcrumbs = True
context.show_sidebar = True
context.order_by = 'creation desc'
- context.introduction =' Please Review this grant application Please Review this grant application {{ grant_description }} {{ grant_purpose }} {{ amount }} {{ grant_past_record }} {{ has_any_past_grant_record }}
Apply for new Grant Application'
-
-
+ context.introduction ='''
+ Apply for new Grant Application'''
@frappe.whitelist()
def send_grant_review_emails(grant_application):
@@ -45,8 +44,8 @@ def send_grant_review_emails(grant_application):
frappe.sendmail(
recipients= grant.assessment_manager,
sender=frappe.session.user,
- subject=grant.title,
- message='
'+url,
+ subject='Grant Application for {0}'.format(grant.applicant_name),
+ message='
' + url,
reference_doctype=grant.doctype,
reference_name=grant.name
)
diff --git a/erpnext/non_profit/doctype/grant_application/grant_application_list.js b/erpnext/non_profit/doctype/grant_application/grant_application_list.js
deleted file mode 100644
index ef06c7169fc..00000000000
--- a/erpnext/non_profit/doctype/grant_application/grant_application_list.js
+++ /dev/null
@@ -1,3 +0,0 @@
-frappe.listview_settings['Grant Application'] = {
- add_fields: ["name", "image"],
-};
diff --git a/erpnext/non_profit/doctype/grant_application/templates/grant_application.html b/erpnext/non_profit/doctype/grant_application/templates/grant_application.html
index ea8aa9eb9df..8fecdadf121 100644
--- a/erpnext/non_profit/doctype/grant_application/templates/grant_application.html
+++ b/erpnext/non_profit/doctype/grant_application/templates/grant_application.html
@@ -1,7 +1,7 @@
{% extends "templates/web.html" %}
{% block page_content %}
- {{ title }}
+ {{ applicant_name }}
{% if frappe.user == owner %}
{% endif %}
@@ -9,11 +9,11 @@
Organization/Indvidual
- {{ organization_type }}
+ {{ applicant_type }}
Grant Applicant Name
- {{ title}}
+ {{ applicant_name}}
Date
@@ -30,15 +30,19 @@
Q. Please outline your current situation and why you are applying for a grant?
Q. Please describe the purpose of the grant and how it will benfit your organization?
- Q. Requested grant amount details?
+ Q. Requested grant amount
Q. Have you recevied grant from us before?
- Contact
{% if frappe.user != 'Guest' %}
+ {% if contact_person %}
+
+
+ {% endif %}
Contact Person
+ {{ contact_person }}
+
Email
{{ email }}
@@ -55,27 +59,4 @@
{% else %}
{% endif %}
-
{% endblock %}
\ No newline at end of file
diff --git a/erpnext/non_profit/doctype/grant_application/templates/grant_application_row.html b/erpnext/non_profit/doctype/grant_application/templates/grant_application_row.html
index 4d1c2e45368..c374959e945 100644
--- a/erpnext/non_profit/doctype/grant_application/templates/grant_application_row.html
+++ b/erpnext/non_profit/doctype/grant_application/templates/grant_application_row.html
@@ -2,7 +2,7 @@