From 419db49806bb5d7ac965a7508950c3ad6c55f52b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 6 Dec 2017 12:57:53 +0530 Subject: [PATCH] non-profit module cleanups --- erpnext/config/non_profit.py | 7 +- erpnext/domains/non_profit.py | 8 +- erpnext/hooks.py | 2 +- .../non_profit/doctype/chapter/chapter.json | 32 +-- .../chapter/templates/chapter_row.html | 2 +- .../chapter_member/chapter_member.json | 6 +- .../grant_application/grant_application.json | 260 ++++++------------ .../grant_application/grant_application.py | 11 +- .../grant_application_list.js | 3 - .../templates/grant_application.html | 41 +-- .../templates/grant_application_row.html | 2 +- .../test_grant_application.js | 12 +- .../doctype/volunteer/test_volunteer.js | 10 +- .../doctype/volunteer/volunteer.json | 47 +++- .../volunteer_availability/__init__.py | 0 .../test_volunteer_availability.js | 23 -- .../test_volunteer_availability.py | 9 - .../volunteer_availability.js | 8 - .../volunteer_availability.json | 73 ----- .../volunteer_availability.py | 9 - .../doctype/volunteer_skills/__init__.py | 0 .../volunteer_skills/volunteer_skills.json | 73 ----- .../volunteer_skills/volunteer_skills.py | 9 - .../volunteer_type/volunteer_type.json | 34 +-- .../grant_application/grant_application.json | 28 +- .../patches/v10_0/add_non_profit_domain.py | 7 + 26 files changed, 181 insertions(+), 535 deletions(-) delete mode 100644 erpnext/non_profit/doctype/grant_application/grant_application_list.js delete mode 100644 erpnext/non_profit/doctype/volunteer_availability/__init__.py delete mode 100644 erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.js delete mode 100644 erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.py delete mode 100644 erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.js delete mode 100644 erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.json delete mode 100644 erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.py delete mode 100644 erpnext/non_profit/doctype/volunteer_skills/__init__.py delete mode 100644 erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.json delete mode 100644 erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.py 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 %}
-

{{ doc.title }}

+

{{ doc.name }}

{{ 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 ='

Grant Application List

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='

Please Review this grant application


'+url, + subject='Grant Application for {0}'.format(grant.applicant_name), + message='

Please Review this grant application


' + 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 %}

Edit Grant

{% endif %} @@ -9,11 +9,11 @@ - + - + @@ -30,15 +30,19 @@
Organization/Indvidual{{ organization_type }}{{ applicant_type }}
Grant Applicant Name{{ title}}{{ applicant_name}}
Date

Q. Please outline your current situation and why you are applying for a grant?

{{ grant_description }}

-

Q. Please describe the purpose of the grant and how it will benfit your organization?

-

{{ grant_purpose }}

-

Q. Requested grant amount details?

+

Q. Requested grant amount

{{ amount }}

Q. Have you recevied grant from us before?

-

{{ grant_past_record }}

+

{{ has_any_past_grant_record }}

Contact

{% if frappe.user != 'Guest' %} + {% if contact_person %} + + + + + {% endif %} @@ -55,27 +59,4 @@ {% else %}


Post a New Grant

{% 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 @@
-

{{ doc.title }}

+

{{ doc.name }}

{{ frappe.format_date(doc.creation) }}

diff --git a/erpnext/non_profit/doctype/grant_application/test_grant_application.js b/erpnext/non_profit/doctype/grant_application/test_grant_application.js index a5a94d1b7c1..47230a52c0b 100644 --- a/erpnext/non_profit/doctype/grant_application/test_grant_application.js +++ b/erpnext/non_profit/doctype/grant_application/test_grant_application.js @@ -12,17 +12,15 @@ QUnit.test("test: Grant Application", function (assert) { // insert a new Member () => frappe.tests.make('Grant Application', [ // values to be set - {title: 'Test Organization'}, - {name:'Test Applicant'}, + {applicant_name: 'Test Organization'}, + {contact_person:'Test Applicant'}, {email: 'test@example.com'}, {grant_description:'Test message'}, - {grant_purpose: 'Test Meesage'}, - {amount: 150000}, - {grant_past_record:'NO'} + {amount: 150000} ]), () => { - assert.equal(cur_frm.doc.title, 'Test Organization'); - assert.equal(cur_frm.doc.grant_applicant_name, 'Test Applicant'); + assert.equal(cur_frm.doc.applicant_name, 'Test Organization'); + assert.equal(cur_frm.doc.contact_person, 'Test Applicant'); assert.equal(cur_frm.doc.email, 'test@example.com'); assert.equal(cur_frm.doc.amount, 150000); }, diff --git a/erpnext/non_profit/doctype/volunteer/test_volunteer.js b/erpnext/non_profit/doctype/volunteer/test_volunteer.js index 2e160a9f877..45eb2813ee3 100644 --- a/erpnext/non_profit/doctype/volunteer/test_volunteer.js +++ b/erpnext/non_profit/doctype/volunteer/test_volunteer.js @@ -15,12 +15,8 @@ QUnit.test("test: Volunteer", function (assert) { {volunteer_name: 'Test Volunteer'}, {volunteer_type:'Test Work'}, {email:'test@example.com'}, - {volunteer_availability_table:[ - [ - {'volunteer_availability': 'Weekends'}, - ] - ]}, - {volunteer_skills_table:[ + {'availability': 'Weekends'}, + {volunteer_skills:[ [ {'volunteer_skills': 'Fundraiser'}, ] @@ -30,7 +26,7 @@ QUnit.test("test: Volunteer", function (assert) { assert.equal(cur_frm.doc.volunteer_name, 'Test Volunteer'); assert.equal(cur_frm.doc.volunteer_type, 'Test Work'); assert.equal(cur_frm.doc.email, 'test@example.com'); - assert.equal(cur_frm.doc.volunteer_availability_table[0].volunteer_availability, 'Weekends'); + assert.equal(cur_frm.doc.availability, 'Weekends'); }, () => done() ]); diff --git a/erpnext/non_profit/doctype/volunteer/volunteer.json b/erpnext/non_profit/doctype/volunteer/volunteer.json index 93bb2bb4547..703230c653e 100644 --- a/erpnext/non_profit/doctype/volunteer/volunteer.json +++ b/erpnext/non_profit/doctype/volunteer/volunteer.json @@ -298,7 +298,7 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Volunteer Availability and Skills Details", + "label": "Availability and Skills", "length": 0, "no_copy": 0, "permlevel": 0, @@ -319,8 +319,8 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "volunteer_availability_table", - "fieldtype": "Table", + "fieldname": "availability", + "fieldtype": "Select", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, @@ -328,10 +328,41 @@ "in_global_search": 0, "in_list_view": 0, "in_standard_filter": 0, - "label": "Volunteer Availability", + "label": "Availability", "length": 0, "no_copy": 0, - "options": "Volunteer Availability", + "options": "\nWeekly\nWeekdays\nWeekends", + "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": "availability_timeslot", + "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": "Availability Timeslot", + "length": 0, + "no_copy": 0, + "options": "\nMorning\nAfternoon\nEvening\nAnytime", "permlevel": 0, "precision": "", "print_hide": 0, @@ -379,7 +410,7 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "volunteer_skills_table", + "fieldname": "volunteer_skills", "fieldtype": "Table", "hidden": 0, "ignore_user_permissions": 0, @@ -391,7 +422,7 @@ "label": "Volunteer Skills", "length": 0, "no_copy": 0, - "options": "Volunteer Skills", + "options": "Volunteer Skill", "permlevel": 0, "precision": "", "print_hide": 0, @@ -475,7 +506,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-12-05 07:02:20.794687", + "modified": "2017-12-06 12:03:08.624579", "modified_by": "Administrator", "module": "Non Profit", "name": "Volunteer", diff --git a/erpnext/non_profit/doctype/volunteer_availability/__init__.py b/erpnext/non_profit/doctype/volunteer_availability/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.js b/erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.js deleted file mode 100644 index 77b2dcf24c3..00000000000 --- a/erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.js +++ /dev/null @@ -1,23 +0,0 @@ -/* eslint-disable */ -// rename this file from _test_[name] to test_[name] to activate -// and remove above this line - -QUnit.test("test: Volunteer Availability", function (assert) { - let done = assert.async(); - - // number of asserts - assert.expect(1); - - frappe.run_serially([ - // insert a new Volunteer Availability - () => frappe.tests.make('Volunteer Availability', [ - // values to be set - {key: 'value'} - ]), - () => { - assert.equal(cur_frm.doc.key, 'value'); - }, - () => done() - ]); - -}); diff --git a/erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.py b/erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.py deleted file mode 100644 index 42b3329af7d..00000000000 --- a/erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.py +++ /dev/null @@ -1,9 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt -from __future__ import unicode_literals - -import unittest - -class TestVolunteerAvailability(unittest.TestCase): - pass diff --git a/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.js b/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.js deleted file mode 100644 index a1557337706..00000000000 --- a/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Volunteer Availability', { - refresh: function() { - - } -}); diff --git a/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.json b/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.json deleted file mode 100644 index 138ec94c013..00000000000 --- a/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2017-09-20 15:16:09.175826", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "volunteer_availability", - "fieldtype": "Select", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Volunteer Availability", - "length": 0, - "no_copy": 0, - "options": "\nWeekly\nWeekdays\nWeekends\nMorning\nAfternoon\nEvening", - "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": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2017-11-20 17:43:27.325962", - "modified_by": "Administrator", - "module": "Non Profit", - "name": "Volunteer Availability", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Non Profit", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.py b/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.py deleted file mode 100644 index 6a8f73e1234..00000000000 --- a/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.py +++ /dev/null @@ -1,9 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -from frappe.model.document import Document - -class VolunteerAvailability(Document): - pass diff --git a/erpnext/non_profit/doctype/volunteer_skills/__init__.py b/erpnext/non_profit/doctype/volunteer_skills/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.json b/erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.json deleted file mode 100644 index 2e1da830ac8..00000000000 --- a/erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2017-09-20 15:26:26.453435", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "volunteer_skills", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Volunteer Skills", - "length": 0, - "no_copy": 0, - "options": "", - "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": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2017-11-20 17:43:35.369782", - "modified_by": "Administrator", - "module": "Non Profit", - "name": "Volunteer Skills", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "restrict_to_domain": "Non Profit", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.py b/erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.py deleted file mode 100644 index 2b54ea5603c..00000000000 --- a/erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.py +++ /dev/null @@ -1,9 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -from frappe.model.document import Document - -class VolunteerSkills(Document): - pass diff --git a/erpnext/non_profit/doctype/volunteer_type/volunteer_type.json b/erpnext/non_profit/doctype/volunteer_type/volunteer_type.json index f4407e2bfc7..256b25fe911 100644 --- a/erpnext/non_profit/doctype/volunteer_type/volunteer_type.json +++ b/erpnext/non_profit/doctype/volunteer_type/volunteer_type.json @@ -3,7 +3,7 @@ "allow_guest_to_view": 0, "allow_import": 0, "allow_rename": 0, - "autoname": "field:volunteer_type", + "autoname": "prompt", "beta": 0, "creation": "2017-09-19 16:13:07.763273", "custom": 0, @@ -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": "volunteer_type", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Volunteer Type", - "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, @@ -84,7 +54,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-12-05 07:05:39.920865", + "modified": "2017-12-06 11:52:08.800425", "modified_by": "Administrator", "module": "Non Profit", "name": "Volunteer Type", diff --git a/erpnext/non_profit/web_form/grant_application/grant_application.json b/erpnext/non_profit/web_form/grant_application/grant_application.json index f8569ce06f6..73c94455002 100644 --- a/erpnext/non_profit/web_form/grant_application/grant_application.json +++ b/erpnext/non_profit/web_form/grant_application/grant_application.json @@ -18,7 +18,7 @@ "is_standard": 1, "login_required": 1, "max_attachment_size": 0, - "modified": "2017-12-05 05:48:57.961053", + "modified": "2017-12-06 12:32:16.893289", "modified_by": "Administrator", "module": "Non Profit", "name": "grant-application", @@ -32,10 +32,10 @@ "title": "Grant Application", "web_form_fields": [ { - "fieldname": "organization_type", + "fieldname": "applicant_type", "fieldtype": "Select", "hidden": 0, - "label": "Organization Type", + "label": "Applicant Type", "max_length": 0, "max_value": 0, "options": "Individual\nOrganization", @@ -43,7 +43,7 @@ "reqd": 1 }, { - "fieldname": "title", + "fieldname": "applicant_name", "fieldtype": "Data", "hidden": 0, "label": "Name", @@ -73,34 +73,24 @@ "read_only": 0, "reqd": 1 }, - { - "fieldname": "grant_purpose", - "fieldtype": "Text", - "hidden": 0, - "label": "Grant Purpose", - "max_length": 0, - "max_value": 0, - "read_only": 0, - "reqd": 1 - }, { "fieldname": "amount", "fieldtype": "Float", "hidden": 0, - "label": "Amount Request", + "label": "Requested Amount", "max_length": 0, "max_value": 0, "read_only": 0, "reqd": 0 }, { - "fieldname": "grant_past_record", - "fieldtype": "Select", + "fieldname": "has_any_past_grant_record", + "fieldtype": "Check", "hidden": 0, - "label": "Grant History", + "label": "Have you received any grant from us before?", "max_length": 0, "max_value": 0, - "options": "YES\nNO", + "options": "", "read_only": 0, "reqd": 0 }, diff --git a/erpnext/patches/v10_0/add_non_profit_domain.py b/erpnext/patches/v10_0/add_non_profit_domain.py index ff673c56f95..b03d6695154 100644 --- a/erpnext/patches/v10_0/add_non_profit_domain.py +++ b/erpnext/patches/v10_0/add_non_profit_domain.py @@ -10,4 +10,11 @@ def execute(): frappe.get_doc({ 'doctype': 'Domain', 'domain': domain + }).insert(ignore_permissions=True) + + frappe.get_doc({ + 'doctype': 'Role', + 'role_name': 'Non Profit Portal User', + 'desk_access': 0, + 'restrict_to_domain': domain }).insert(ignore_permissions=True) \ No newline at end of file
Contact Person{{ contact_person }}
Email {{ email }}