diff --git a/foundation/erpnext_foundation/doctype/chapter/__init__.py b/foundation/erpnext_foundation/doctype/chapter/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/foundation/erpnext_foundation/doctype/chapter/chapter.js b/foundation/erpnext_foundation/doctype/chapter/chapter.js deleted file mode 100644 index d09224d9..00000000 --- a/foundation/erpnext_foundation/doctype/chapter/chapter.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2017, EOSSF and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Chapter', { - refresh: function(frm) { - - } -}); diff --git a/foundation/erpnext_foundation/doctype/chapter/chapter.json b/foundation/erpnext_foundation/doctype/chapter/chapter.json deleted file mode 100644 index 94cb6076..00000000 --- a/foundation/erpnext_foundation/doctype/chapter/chapter.json +++ /dev/null @@ -1,337 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 1, - "allow_import": 0, - "allow_rename": 0, - "autoname": "field:title", - "beta": 0, - "creation": "2017-05-08 17:00:17.610142", - "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": "title", - "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": "Title", - "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, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "chapter_head", - "fieldtype": "Link", - "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": "Chapter Head", - "length": 0, - "no_copy": 0, - "options": "User", - "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": "introduction", - "fieldtype": "Text Editor", - "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": "Introduction", - "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, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "meetup_embed_html", - "fieldtype": "Code", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Meetup Embed HTML", - "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": "published", - "fieldtype": "Check", - "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": "Published", - "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": "route", - "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": "Route", - "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, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "region", - "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": "Region", - "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, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "address", - "fieldtype": "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": "Address", - "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": "members", - "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": "Members", - "length": 0, - "no_copy": 0, - "options": "Chapter Member", - "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_view": 0, - "in_create": 0, - "is_published_field": "published", - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2017-08-02 13:04:00.723298", - "modified_by": "Administrator", - "module": "ERPNext Foundation", - "name": "Chapter", - "name_case": "Title Case", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "route": "chapters", - "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/foundation/erpnext_foundation/doctype/chapter/chapter.py b/foundation/erpnext_foundation/doctype/chapter/chapter.py deleted file mode 100644 index f0d2bc57..00000000 --- a/foundation/erpnext_foundation/doctype/chapter/chapter.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2017, EOSSF and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.website.website_generator import WebsiteGenerator -from frappe.model.document import Document -from frappe import _ - -class Chapter(WebsiteGenerator): - def get_context(self, context): - context.no_cache = True - - def validate(self): - chapter_head = self.chapter_head - chapter = frappe.get_all('Chapter', filters={'published': True}, fields=['chapter_head']) - - # if chapter_head in [d.chapter_head for d in chapter]: - # frappe.throw(_('You are not allow to create more than one Chapter')) - - def enable(self): - chapter = frappe.get_doc('Chapter', frappe.form_dict.name) - chapter.append('members', dict(enable=self.value)) - chapter.save(ignore_permissions=1) - frappe.db.commit() - - -def get_list_context(context): - context.allow_guest = True - context.no_cache = True - context.title = 'ERPNext Chapters' - context.no_breadcrumbs = True - context.order_by = 'creation desc' - context.introduction = '
All ERPNext Chapters
' - - -@frappe.whitelist() -def leave(title, user_id, leave_reason): - chapter = frappe.get_doc("Chapter", title) - for member in chapter.members: - if member.user == user_id: - member.enabled = 0 - member.leave_reason = leave_reason - chapter.save(ignore_permissions=1) - frappe.db.commit() - return "Thank you for Feedback" \ No newline at end of file diff --git a/foundation/erpnext_foundation/doctype/chapter/templates/chapter.html b/foundation/erpnext_foundation/doctype/chapter/templates/chapter.html deleted file mode 100644 index 832aef51..00000000 --- a/foundation/erpnext_foundation/doctype/chapter/templates/chapter.html +++ /dev/null @@ -1,71 +0,0 @@ -{% extends "templates/web.html" %} - -{% block page_content %} -{{ introduction }}
-{% if meetup_embed_html %} -{{ meetup_embed_html }} -{% endif %} -| - | Member Details | -
|---|---|
| {{ flag }} | -
-
-
- {{ frappe.db.get_value('User', user.user, 'full_name') }}
-
- {% if user.website_url %}
- {{ user.website_url or '' }}
- {% endif %}
-
-
- {% if user.introduction %}
- {{ user.introduction }}
- {% endif %}
-
- |
-
No member yet.
-{% endif %} - -| Name | -{{ frappe.db.get_value('User', chapter_head, 'full_name') }} | -
| {{ frappe.db.get_value('User', chapter_head, 'email') or '' }} | -|
| Phone | -{{ frappe.db.get_value('User', chapter_head, 'phone') or '' }} | -
{{ address }}
- - - - -If you would like to start a new chapter, email us at foundation@erpnext.org
- -{% endblock %} - - \ No newline at end of file diff --git a/foundation/erpnext_foundation/doctype/chapter/templates/chapter_row.html b/foundation/erpnext_foundation/doctype/chapter/templates/chapter_row.html deleted file mode 100644 index cd345966..00000000 --- a/foundation/erpnext_foundation/doctype/chapter/templates/chapter_row.html +++ /dev/null @@ -1,11 +0,0 @@ - - \ No newline at end of file diff --git a/foundation/erpnext_foundation/doctype/chapter/test_chapter.js b/foundation/erpnext_foundation/doctype/chapter/test_chapter.js deleted file mode 100644 index e3b75be4..00000000 --- a/foundation/erpnext_foundation/doctype/chapter/test_chapter.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: Chapter", function (assert) { - let done = assert.async(); - - // number of asserts - assert.expect(1); - - frappe.run_serially('Chapter', [ - // insert a new Chapter - () => frappe.tests.make([ - // values to be set - {key: 'value'} - ]), - () => { - assert.equal(cur_frm.doc.key, 'value'); - }, - () => done() - ]); - -}); diff --git a/foundation/erpnext_foundation/doctype/chapter/test_chapter.py b/foundation/erpnext_foundation/doctype/chapter/test_chapter.py deleted file mode 100644 index f2d67782..00000000 --- a/foundation/erpnext_foundation/doctype/chapter/test_chapter.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2017, EOSSF and Contributors -# See license.txt -from __future__ import unicode_literals - -import frappe -import unittest - -class TestChapter(unittest.TestCase): - pass diff --git a/foundation/erpnext_foundation/doctype/chapter_member/__init__.py b/foundation/erpnext_foundation/doctype/chapter_member/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/foundation/erpnext_foundation/doctype/chapter_member/chapter_member.json b/foundation/erpnext_foundation/doctype/chapter_member/chapter_member.json deleted file mode 100644 index 60074372..00000000 --- a/foundation/erpnext_foundation/doctype/chapter_member/chapter_member.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2017-05-08 17:01:23.626064", - "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": "user", - "fieldtype": "Link", - "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": "User", - "length": 0, - "no_copy": 0, - "options": "User", - "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": "introduction", - "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": "Introduction", - "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": "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": "Website URL", - "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": "enabled", - "fieldtype": "Check", - "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": "Enabled", - "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": "leave_reason", - "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": "Leave Reason", - "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 - } - ], - "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-15 02:09:49.082752", - "modified_by": "Administrator", - "module": "ERPNext Foundation", - "name": "Chapter Member", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "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/foundation/erpnext_foundation/doctype/chapter_member/chapter_member.py b/foundation/erpnext_foundation/doctype/chapter_member/chapter_member.py deleted file mode 100644 index ebeffa51..00000000 --- a/foundation/erpnext_foundation/doctype/chapter_member/chapter_member.py +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2017, EOSSF and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document - -class ChapterMember(Document): - def get_context(self, context): - context.no_cache = True - - - diff --git a/foundation/erpnext_foundation/doctype/chapter_message/__init__.py b/foundation/erpnext_foundation/doctype/chapter_message/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/foundation/erpnext_foundation/doctype/chapter_message/chapter_message.js b/foundation/erpnext_foundation/doctype/chapter_message/chapter_message.js deleted file mode 100644 index 739eaa99..00000000 --- a/foundation/erpnext_foundation/doctype/chapter_message/chapter_message.js +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2017, EOSSF and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Chapter Message', { - onload: function(frm){ - console.log("here" + frappe.session.user) - chapter_head = frappe.session.user - frappe.db.get_value('Chapter', {chapter_head: chapter_head}, 'name', function(data) { - frm.set_value('chapter', data.name); - }) - }, -}); diff --git a/foundation/erpnext_foundation/doctype/chapter_message/chapter_message.json b/foundation/erpnext_foundation/doctype/chapter_message/chapter_message.json deleted file mode 100644 index 6b1b76e9..00000000 --- a/foundation/erpnext_foundation/doctype/chapter_message/chapter_message.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2017-05-11 14:22:40.165630", - "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": "subject", - "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": "Subject", - "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, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "message", - "fieldtype": "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": " Message", - "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, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "chapter", - "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", - "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": 1, - "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": 0, - "max_attachments": 0, - "modified": "2017-05-12 11:10:12.066924", - "modified_by": "Administrator", - "module": "ERPNext Foundation", - "name": "Chapter Message", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "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/foundation/erpnext_foundation/doctype/chapter_message/chapter_message.py b/foundation/erpnext_foundation/doctype/chapter_message/chapter_message.py deleted file mode 100644 index cf76e203..00000000 --- a/foundation/erpnext_foundation/doctype/chapter_message/chapter_message.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2017, EOSSF and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals -import frappe -from frappe.model.document import Document -from frappe import _ - -class ChapterMessage(Document): - def get_context(self, context): - context.no_cache = True - - def validate(self): - chapter = frappe.get_doc('Chapter', self.chapter) - if frappe.session.user != chapter.chapter_head: - frappe.throw(_('You are not athourize to send message for this Chapter.')) - - def on_update(self): - chapter = frappe.get_doc('Chapter', self.chapter) - recipients = [d.user for d in chapter.members] - message = self.message - message += "Chapter Title: " + self.chapter - # chapter_title = self.chapter - - frappe.sendmail(recipients = recipients, - message = self.message, - subject = self.subject) - # reference_doctype=self.doctype, reference_name=self.name) - - -def get_members_emails(chapterTitle): - - members_list = frappe.get_all('User', fields=['email'], - filters={'chapter.title': chapterTitle}) - - out = [] - for e in members_list: - if e.email: - # don't add if holiday - out.append(e.email) - print out - return out \ No newline at end of file diff --git a/foundation/erpnext_foundation/doctype/chapter_message/test_chapter_message.py b/foundation/erpnext_foundation/doctype/chapter_message/test_chapter_message.py deleted file mode 100644 index 21b63ed7..00000000 --- a/foundation/erpnext_foundation/doctype/chapter_message/test_chapter_message.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2017, EOSSF and Contributors -# See license.txt -from __future__ import unicode_literals - -import frappe -import unittest - -class TestChapterMessage(unittest.TestCase): - pass