Skip to content

Commit

Permalink
Merge pull request #27 from neilLasrado/develop
Browse files Browse the repository at this point in the history
Multiple Fixes
  • Loading branch information
neilLasrado authored Jun 28, 2020
2 parents f4ca637 + 815f09f commit 380a6a9
Show file tree
Hide file tree
Showing 19 changed files with 266 additions and 54 deletions.
3 changes: 1 addition & 2 deletions pranali_reloaded/desk.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,5 @@ def set_desktop_icons():
hook_icons = frappe.get_hooks("icons")
for icon in hook_icons:
desktop.get(icon.get('module')).append(icon)

print(desktop)

return desktop
2 changes: 1 addition & 1 deletion pranali_reloaded/hook_events/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

def set_user_permissions_for_dcm(doc, method):
for r in doc.roles:
if r.role =="DCM":
if r.role =="District Council Member":
if not frappe.get_all("User Permission",filters={"user":doc.name}):
perm = frappe.new_doc("User Permission")
perm.user = doc.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"section_break_4",
"time_stamp",
"column_break_8",
"total_attendence",
"total_attendance",
"section_break_8",
"club",
"column_break_12",
Expand Down Expand Up @@ -73,12 +73,6 @@
"fieldname": "column_break_8",
"fieldtype": "Column Break"
},
{
"fieldname": "total_attendence",
"fieldtype": "Int",
"in_list_view": 1,
"label": "Total Attendence"
},
{
"fieldname": "section_break_8",
"fieldtype": "Section Break"
Expand Down Expand Up @@ -118,11 +112,17 @@
"options": "Ambassadorial Report",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "total_attendance",
"fieldtype": "Int",
"in_list_view": 1,
"label": "Total Attendance"
}
],
"is_submittable": 1,
"links": [],
"modified": "2020-06-13 01:02:30.065535",
"modified": "2020-06-28 21:31:24.124249",
"modified_by": "Administrator",
"module": "Pranali Reloaded",
"name": "Ambassadorial Report",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def validate(self):
def on_submit(self):
self.time_stamp = now()
frappe.db.set_value('Ambassadorial Report', self.name, 'document_status', 'submitted')

def on_cancel(self):
frappe.db.set_value('Ambassadorial Report', self.name, 'document_status', 'cancelled')

Expand All @@ -32,9 +32,9 @@ def check_duplicates(self):
if not d.member_id in members:
members.append(d.member_id)
else:
frappe.throw("Attendence for {0} appears multiple times.".format(d.member_name))
frappe.throw("Attendance for {0} appears multiple times.".format(d.member_name))

def count_total(self):
self.total_attendence = 0
self.total_attendance = 0
for d in self.members:
self.total_attendence +=1
self.total_attendance +=1
Empty file.
8 changes: 8 additions & 0 deletions pranali_reloaded/pranali_reloaded/doctype/avenue/avenue.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2020, Rtr.Neil Trini Lasrado and contributors
// For license information, please see license.txt

frappe.ui.form.on('Avenue', {
// refresh: function(frm) {

// }
});
70 changes: 70 additions & 0 deletions pranali_reloaded/pranali_reloaded/doctype/avenue/avenue.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"actions": [],
"autoname": "field:avenue",
"creation": "2020-06-28 21:38:51.355130",
"doctype": "DocType",
"document_type": "Setup",
"engine": "InnoDB",
"field_order": [
"avenue"
],
"fields": [
{
"fieldname": "avenue",
"fieldtype": "Data",
"label": "Avenue",
"unique": 1
}
],
"links": [],
"modified": "2020-06-28 21:38:51.355130",
"modified_by": "Administrator",
"module": "Pranali Reloaded",
"name": "Avenue",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Administrator",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"read": 1,
"role": "Club Member - Full Access"
},
{
"read": 1,
"role": "District Council Member"
},
{
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Club Member - Limited Access",
"share": 1
}
],
"sort_field": "modified",
"sort_order": "DESC"
}
10 changes: 10 additions & 0 deletions pranali_reloaded/pranali_reloaded/doctype/avenue/avenue.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Rtr.Neil Trini Lasrado and contributors
# For license information, please see license.txt

from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document

class Avenue(Document):
pass
10 changes: 10 additions & 0 deletions pranali_reloaded/pranali_reloaded/doctype/avenue/test_avenue.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Rtr.Neil Trini Lasrado and Contributors
# See license.txt
from __future__ import unicode_literals

# import frappe
import unittest

class TestAvenue(unittest.TestCase):
pass
34 changes: 32 additions & 2 deletions pranali_reloaded/pranali_reloaded/doctype/club/club.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@
"column_break_13",
"website",
"blog",
"instagram_handle",
"column_break_8",
"facebook_page_address",
"twitter_handle"
"twitter_handle",
"section_break_24",
"buddy_council_member",
"column_break_26",
"buddy_council_name"
],
"fields": [
{
Expand Down Expand Up @@ -158,10 +163,35 @@
"fieldname": "twitter_handle",
"fieldtype": "Data",
"label": "Twitter Handle"
},
{
"fieldname": "instagram_handle",
"fieldtype": "Data",
"label": "Instagram Handle"
},
{
"fieldname": "section_break_24",
"fieldtype": "Section Break"
},
{
"fieldname": "buddy_council_member",
"fieldtype": "Link",
"label": "Buddy Council Member",
"options": "User"
},
{
"fieldname": "column_break_26",
"fieldtype": "Column Break"
},
{
"fetch_from": "buddy_council_member.full_name",
"fieldname": "buddy_council_name",
"fieldtype": "Data",
"label": "Buddy Council Name"
}
],
"links": [],
"modified": "2020-06-13 01:01:29.650731",
"modified": "2020-06-28 21:30:01.057277",
"modified_by": "Administrator",
"module": "Pranali Reloaded",
"name": "Club",
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2020, Rtr.Neil Trini Lasrado and contributors
// For license information, please see license.txt

frappe.ui.form.on('Designation', {
// refresh: function(frm) {

// }
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"actions": [],
"autoname": "field:designation",
"creation": "2020-06-28 21:18:40.566598",
"doctype": "DocType",
"document_type": "Setup",
"engine": "InnoDB",
"field_order": [
"designation"
],
"fields": [
{
"fieldname": "designation",
"fieldtype": "Data",
"label": "Designation",
"unique": 1
}
],
"links": [],
"modified": "2020-06-28 21:18:40.566598",
"modified_by": "Administrator",
"module": "Pranali Reloaded",
"name": "Designation",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Administrator",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
},
{
"read": 1,
"role": "Club Member - Full Access"
},
{
"read": 1,
"role": "District Council Member"
},
{
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Club Member - Limited Access",
"share": 1
}
],
"sort_field": "modified",
"sort_order": "DESC"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Rtr.Neil Trini Lasrado and contributors
# For license information, please see license.txt

from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document

class Designation(Document):
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Rtr.Neil Trini Lasrado and Contributors
# See license.txt
from __future__ import unicode_literals

# import frappe
import unittest

class TestDesignation(unittest.TestCase):
pass
14 changes: 7 additions & 7 deletions pranali_reloaded/pranali_reloaded/doctype/meeting/meeting.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"reporting_month",
"section_break_5",
"minutes",
"section_break_2",
"attendance_section",
"home_club",
"district_council_members",
"rotarians",
Expand Down Expand Up @@ -90,11 +90,6 @@
"label": "Minutes",
"reqd": 1
},
{
"fieldname": "section_break_2",
"fieldtype": "Section Break",
"label": "Attendence"
},
{
"fieldname": "home_club",
"fieldtype": "Int",
Expand Down Expand Up @@ -187,11 +182,16 @@
"fieldname": "district_council_members",
"fieldtype": "Int",
"label": "District Council Members"
},
{
"fieldname": "attendance_section",
"fieldtype": "Section Break",
"label": "Attendance"
}
],
"is_submittable": 1,
"links": [],
"modified": "2020-06-13 00:57:49.310522",
"modified": "2020-06-28 21:37:09.182626",
"modified_by": "Administrator",
"module": "Pranali Reloaded",
"name": "Meeting",
Expand Down
Loading

0 comments on commit 380a6a9

Please sign in to comment.