diff --git a/education_erp_dashboard/README.rst b/education_erp_dashboard/README.rst new file mode 100755 index 000000000..3118c73da --- /dev/null +++ b/education_erp_dashboard/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Education ERP Dashboard +======================= +A visually informative interface of education ERP system provides an at-a-glance overview of essential data. + +Configuration +============= +- No additional configuration required + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: (V15) Sruthi Renjith, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/education_erp_dashboard/__init__.py b/education_erp_dashboard/__init__.py new file mode 100755 index 000000000..1fd77f147 --- /dev/null +++ b/education_erp_dashboard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Sruthi Renjith (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import models diff --git a/education_erp_dashboard/__manifest__.py b/education_erp_dashboard/__manifest__.py new file mode 100755 index 000000000..271d7df0b --- /dev/null +++ b/education_erp_dashboard/__manifest__.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Sruthi Renjith (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +{ + 'name': 'Education ERP Dashboard', + 'version': '15.0.1.0.0', + 'category': 'Industries, Productivity', + 'summary': 'An integrated view of the education ERP system', + 'description': """A comprehensive module designed to provide educational + institutions to manage and monitor various operations""", + 'author': "Cybrosys Techno Solutions", + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['base', 'education_attendances', 'education_promotion', + 'education_time_table'], + 'data': [ + 'security/ir.model.access.csv', + 'views/dashboard_tag_views.xml', + 'views/erp_dashboard_menu.xml'], + 'assets': { + 'web.assets_backend': [ + 'education_erp_dashboard/static/src/js/dashboard.js', + 'education_erp_dashboard/static/src/css/dashboard.css', + 'https://cdn.jsdelivr.net/npm/chart.js' + ], + 'web.assets_qweb': [ + 'education_erp_dashboard/static/src/xml/dashboard_templates.xml', + 'education_erp_dashboard/static/src/xml/dashboard_content_templates.xml' + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': True, +} diff --git a/education_erp_dashboard/doc/RELEASE_NOTES.md b/education_erp_dashboard/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..79b781b0c --- /dev/null +++ b/education_erp_dashboard/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 22.09.2023 +#### Version 15.0.1.0.0 +#### ADD +- Initial commit for Education ERP Dashboard diff --git a/education_erp_dashboard/models/__init__.py b/education_erp_dashboard/models/__init__.py new file mode 100755 index 000000000..cd0417811 --- /dev/null +++ b/education_erp_dashboard/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Sruthi Renjith (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import erp_dashboard diff --git a/education_erp_dashboard/models/erp_dashboard.py b/education_erp_dashboard/models/erp_dashboard.py new file mode 100755 index 000000000..509e1e951 --- /dev/null +++ b/education_erp_dashboard/models/erp_dashboard.py @@ -0,0 +1,166 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Sruthi Renjith (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import api, fields, models + + +class ERPDashboard(models.Model): + """ Class to get all the required data for the dashboard """ + _name = "erp.dashboard" + _description = "Education ERP Dashboard" + + @api.model + def erp_data(self): + """ Function to get the datas like number of application, number of + students, number of faculties, number of amenities and number of + exams """ + return { + 'applications': self.env['education.application'].search_count([]), + 'students': self.env['education.student'].search_count([]), + 'faculties': self.env['education.faculty'].search_count([]), + 'amenities': self.env['education.amenities'].search_count([]), + 'exams': self.env['education.exam'].search_count([]), + } + + @api.model + def get_all_applications(self): + """ Function to get count of applications in each academic year """ + years = self.env['education.application'].search([]).mapped( + 'academic_year_id') + application_count_dict = { + year.name: self.env['education.application'].search_count( + [('academic_year_id', '=', year.name)]) for year in years} + return application_count_dict + + @api.model + def get_rejected_accepted_applications(self): + """ Function to get count of all accepted and rejected applications """ + application_dict = {} + academic_year_date = 0 + academic_year_year = '' + academic_year = self.env['education.academic.year'].search([]) + for years in academic_year: + academic_year_date = years.ay_end_date + academic_year_year = years.name + for year in academic_year: + if academic_year_date < year.ay_end_date: + academic_year_date = year.ay_end_date + academic_year_year = year.name + rejected_applications = self.env['education.application'].search_count( + [('state', '=', 'reject'), + ('academic_year_id', '=', academic_year_year)]) + accepted_applications = self.env['education.application'].search_count( + [('state', '=', 'done'), + ('academic_year_id', '=', academic_year_year)]) + application_dict.update( + {'Done': accepted_applications, 'Reject': rejected_applications}) + return application_dict + + @api.model + def get_exam_result(self): + """ Function to get total exam result """ + exam_result_dict = {} + pass_count = self.env['results.subject.line'].search_count( + [('pass_or_fail', '=', True)]) + fail_count = self.env['results.subject.line'].search_count( + [('pass_or_fail', '=', False)]) + exam_result_dict.update({'Pass': pass_count, 'Fail': fail_count}) + return exam_result_dict + + @api.model + def get_attendance(self): + """ Function to get total attendance """ + attendance_dict = {} + absents = self.env['education.attendance.line'].search_count( + [('date', '=', fields.Date.today()), ('full_day_absent', '=', 1)]) + total = self.env['education.student'].search_count([]) + presents = total - absents + attendance_dict.update({'Presents': presents, 'Absents': absents}) + return attendance_dict + + @api.model + def get_student_strength(self): + """ Function to get class wise student strength """ + classes = self.env['education.class.division'].search([]) + class_wise_dict = { + clas.name: self.env['education.student'].search_count( + [('class_id', '=', clas.id)]) for clas in classes} + return class_wise_dict + + @api.model + def get_average_marks(self): + """ Function to get class wise average marks """ + class_average_mark_dict = {} + classes = self.env['education.class.division'].search([]) + for clas in classes: + all_students = self.env['education.student'].search( + [('class_id', '=', clas.id)]) + if all_students: + class_mark_list = [sum( + self.env['education.exam.results'].search( + [('student_id', '=', student.id)]).mapped( + 'total_mark_scored')) for student in all_students] + count = len(class_mark_list) + total_marks = sum(class_mark_list) + average_mark = total_marks / count + class_average_mark_dict.update({clas.name: average_mark}) + return class_average_mark_dict + + @api.model + def get_academic_year(self): + """ Function to get the academic year """ + academic_dict = {year.id: year.name for year in + self.env['education.academic.year'].search([])} + return academic_dict + + @api.model + def get_academic_year_exam_result(self, *args): + """ Function to get exam results in each academic year """ + academic_exam_result_dict = {} + academic_pass_count = self.env['results.subject.line'].search_count( + [('academic_year.id', '=', *args), ('pass_or_fail', '=', True)]) + academic_fail_count = self.env['results.subject.line'].search_count( + [('academic_year.id', '=', *args), ('pass_or_fail', '=', False)]) + academic_exam_result_dict.update( + {'Pass': academic_pass_count, 'Fail': academic_fail_count}) + return academic_exam_result_dict + + @api.model + def get_classes(self): + """ Function to get the classes """ + class_dict = {clas.id: clas.name for clas in + self.env['education.class.division'].search([])} + return class_dict + + @api.model + def get_class_attendance_today(self, *args): + """ Function to get class wise attendance """ + class_attendance_dict = {} + class_absents = self.env['education.attendance.line'].search_count( + [('division_id.id', '=', *args), + ('date', '=', fields.Date.today()), + ('full_day_absent', '=', 1)]) + class_total = self.env['education.student'].search_count( + [('class_id.id', '=', *args)]) + class_presents = class_total - class_absents + class_attendance_dict.update( + {'Presents': class_presents, 'Absents': class_absents}) + return class_attendance_dict diff --git a/education_erp_dashboard/security/ir.model.access.csv b/education_erp_dashboard/security/ir.model.access.csv new file mode 100755 index 000000000..415194904 --- /dev/null +++ b/education_erp_dashboard/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +access_erp_dashboard,access.erp.dashboard,model_erp_dashboard,base.group_user,1,1,1,1 diff --git a/education_erp_dashboard/static/description/assets/icons/cogs.png b/education_erp_dashboard/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/cogs.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/consultation.png b/education_erp_dashboard/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/consultation.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/ecom-black.png b/education_erp_dashboard/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/ecom-black.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/education-black.png b/education_erp_dashboard/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/education-black.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/hotel-black.png b/education_erp_dashboard/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/hotel-black.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/license.png b/education_erp_dashboard/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/license.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/lifebuoy.png b/education_erp_dashboard/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/lifebuoy.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/manufacturing-black.png b/education_erp_dashboard/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/manufacturing-black.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/pos-black.png b/education_erp_dashboard/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/pos-black.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/puzzle.png b/education_erp_dashboard/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/puzzle.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/restaurant-black.png b/education_erp_dashboard/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/restaurant-black.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/service-black.png b/education_erp_dashboard/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/service-black.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/trading-black.png b/education_erp_dashboard/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/trading-black.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/training.png b/education_erp_dashboard/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/training.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/update.png b/education_erp_dashboard/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/update.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/user.png b/education_erp_dashboard/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/user.png differ diff --git a/education_erp_dashboard/static/description/assets/icons/wrench.png b/education_erp_dashboard/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/education_erp_dashboard/static/description/assets/icons/wrench.png differ diff --git a/education_erp_dashboard/static/description/assets/misc/categories.png b/education_erp_dashboard/static/description/assets/misc/categories.png new file mode 100755 index 000000000..bedf1e0b1 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/misc/categories.png differ diff --git a/education_erp_dashboard/static/description/assets/misc/check-box.png b/education_erp_dashboard/static/description/assets/misc/check-box.png new file mode 100755 index 000000000..42caf24b9 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/misc/check-box.png differ diff --git a/education_erp_dashboard/static/description/assets/misc/compass.png b/education_erp_dashboard/static/description/assets/misc/compass.png new file mode 100755 index 000000000..d5fed8faa Binary files /dev/null and b/education_erp_dashboard/static/description/assets/misc/compass.png differ diff --git a/education_erp_dashboard/static/description/assets/misc/config.png b/education_erp_dashboard/static/description/assets/misc/config.png new file mode 100755 index 000000000..71915e76c Binary files /dev/null and b/education_erp_dashboard/static/description/assets/misc/config.png differ diff --git a/education_erp_dashboard/static/description/assets/misc/corporate.png b/education_erp_dashboard/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/education_erp_dashboard/static/description/assets/misc/corporate.png differ diff --git a/education_erp_dashboard/static/description/assets/misc/customer-support.png b/education_erp_dashboard/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/education_erp_dashboard/static/description/assets/misc/customer-support.png differ diff --git a/education_erp_dashboard/static/description/assets/misc/e_logo.png b/education_erp_dashboard/static/description/assets/misc/e_logo.png new file mode 100755 index 000000000..30138207a Binary files /dev/null and b/education_erp_dashboard/static/description/assets/misc/e_logo.png differ diff --git a/education_erp_dashboard/static/description/assets/misc/features.png b/education_erp_dashboard/static/description/assets/misc/features.png new file mode 100755 index 000000000..b41769f77 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/misc/features.png differ diff --git a/education_erp_dashboard/static/description/assets/misc/logo.png b/education_erp_dashboard/static/description/assets/misc/logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/education_erp_dashboard/static/description/assets/misc/logo.png differ diff --git a/education_erp_dashboard/static/description/assets/misc/pictures.png b/education_erp_dashboard/static/description/assets/misc/pictures.png new file mode 100755 index 000000000..56d255fe9 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/misc/pictures.png differ diff --git a/education_erp_dashboard/static/description/assets/misc/pie-chart.png b/education_erp_dashboard/static/description/assets/misc/pie-chart.png new file mode 100755 index 000000000..426e05244 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/misc/pie-chart.png differ diff --git a/education_erp_dashboard/static/description/assets/misc/right-arrow.png b/education_erp_dashboard/static/description/assets/misc/right-arrow.png new file mode 100755 index 000000000..730984a06 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/misc/right-arrow.png differ diff --git a/education_erp_dashboard/static/description/assets/misc/star.png b/education_erp_dashboard/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/education_erp_dashboard/static/description/assets/misc/star.png differ diff --git a/education_erp_dashboard/static/description/assets/misc/support.png b/education_erp_dashboard/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/misc/support.png differ diff --git a/education_erp_dashboard/static/description/assets/misc/whatsapp.png b/education_erp_dashboard/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/misc/whatsapp.png differ diff --git a/education_erp_dashboard/static/description/assets/modules/1.png b/education_erp_dashboard/static/description/assets/modules/1.png new file mode 100644 index 000000000..c91588afd Binary files /dev/null and b/education_erp_dashboard/static/description/assets/modules/1.png differ diff --git a/education_erp_dashboard/static/description/assets/modules/2.png b/education_erp_dashboard/static/description/assets/modules/2.png new file mode 100644 index 000000000..ad837a393 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/modules/2.png differ diff --git a/education_erp_dashboard/static/description/assets/modules/3.png b/education_erp_dashboard/static/description/assets/modules/3.png new file mode 100644 index 000000000..0348f9de3 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/modules/3.png differ diff --git a/education_erp_dashboard/static/description/assets/modules/4.png b/education_erp_dashboard/static/description/assets/modules/4.png new file mode 100644 index 000000000..c81fe9ba6 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/modules/4.png differ diff --git a/education_erp_dashboard/static/description/assets/modules/5.png b/education_erp_dashboard/static/description/assets/modules/5.png new file mode 100644 index 000000000..4205c296b Binary files /dev/null and b/education_erp_dashboard/static/description/assets/modules/5.png differ diff --git a/education_erp_dashboard/static/description/assets/modules/6.png b/education_erp_dashboard/static/description/assets/modules/6.png new file mode 100644 index 000000000..6dec9d81d Binary files /dev/null and b/education_erp_dashboard/static/description/assets/modules/6.png differ diff --git a/education_erp_dashboard/static/description/assets/screenshots/application.png b/education_erp_dashboard/static/description/assets/screenshots/application.png new file mode 100644 index 000000000..7e1962af5 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/screenshots/application.png differ diff --git a/education_erp_dashboard/static/description/assets/screenshots/attendance.png b/education_erp_dashboard/static/description/assets/screenshots/attendance.png new file mode 100644 index 000000000..a397993eb Binary files /dev/null and b/education_erp_dashboard/static/description/assets/screenshots/attendance.png differ diff --git a/education_erp_dashboard/static/description/assets/screenshots/average_marks.png b/education_erp_dashboard/static/description/assets/screenshots/average_marks.png new file mode 100644 index 000000000..c21850e52 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/screenshots/average_marks.png differ diff --git a/education_erp_dashboard/static/description/assets/screenshots/dashboard.png b/education_erp_dashboard/static/description/assets/screenshots/dashboard.png new file mode 100644 index 000000000..3bb0039ee Binary files /dev/null and b/education_erp_dashboard/static/description/assets/screenshots/dashboard.png differ diff --git a/education_erp_dashboard/static/description/assets/screenshots/exam_result.png b/education_erp_dashboard/static/description/assets/screenshots/exam_result.png new file mode 100644 index 000000000..6612550eb Binary files /dev/null and b/education_erp_dashboard/static/description/assets/screenshots/exam_result.png differ diff --git a/education_erp_dashboard/static/description/assets/screenshots/hero.gif b/education_erp_dashboard/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..2dc367f69 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/screenshots/hero.gif differ diff --git a/education_erp_dashboard/static/description/assets/screenshots/rejected_applications.png b/education_erp_dashboard/static/description/assets/screenshots/rejected_applications.png new file mode 100644 index 000000000..51d276fcf Binary files /dev/null and b/education_erp_dashboard/static/description/assets/screenshots/rejected_applications.png differ diff --git a/education_erp_dashboard/static/description/assets/screenshots/student_strength.png b/education_erp_dashboard/static/description/assets/screenshots/student_strength.png new file mode 100644 index 000000000..c96fdaf1c Binary files /dev/null and b/education_erp_dashboard/static/description/assets/screenshots/student_strength.png differ diff --git a/education_erp_dashboard/static/description/assets/screenshots/tiles.png b/education_erp_dashboard/static/description/assets/screenshots/tiles.png new file mode 100644 index 000000000..e11ea97f3 Binary files /dev/null and b/education_erp_dashboard/static/description/assets/screenshots/tiles.png differ diff --git a/education_erp_dashboard/static/description/banner.jpg b/education_erp_dashboard/static/description/banner.jpg new file mode 100644 index 000000000..fb99ea59c Binary files /dev/null and b/education_erp_dashboard/static/description/banner.jpg differ diff --git a/education_erp_dashboard/static/description/icon.png b/education_erp_dashboard/static/description/icon.png new file mode 100644 index 000000000..945c2a2ac Binary files /dev/null and b/education_erp_dashboard/static/description/icon.png differ diff --git a/education_erp_dashboard/static/description/index.html b/education_erp_dashboard/static/description/index.html new file mode 100755 index 000000000..5eff6cf47 --- /dev/null +++ b/education_erp_dashboard/static/description/index.html @@ -0,0 +1,735 @@ +
+ +
+ +
+
+ Community +
+
+
+ + +
+
+
+ +

+ Education ERP Dashboard

+

+ Insight to Educational ERP

+ + +
+
+
+
+ + +
+
+ +
+

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ Education ERP Dashboard give an insight to Education ERP Core. + This dashboard allows a quick analysis of the details related to + students, faculties, exams and all. +
+
+ + + +
+
+ +
+

+ Configuration +

+
+
+
+ No additional configuration is required. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ +
+ Clickable dashboard cards. +
+
+
+ +
+ A quick analysis of the counts. +
+
+
+ +
+ Insight of upcoming and recent activities. +
+
+
+ +
+ Academic wise exam results. +
+
+
+ +
+ Attendance details as doughnut chart. +
+
+
+ +
+ Exam result in pie chart. +
+
+
+ +
+ Class wise student strength. +
+
+
+ +
+ Student application details. +
+
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Dashboard view

+

+ This is the overall view of the dashboard.

+ +
+
+

+ Clickable tiles

+

+ This gives all the details in one click.

+ +
+
+

+ Application Bar Chart

+

+ This gives the count of applications in each academic year.

+ +
+ +
+

+ Student Attendance

+

+ A doughnut chart that gives the total and class wise attendance + details.

+ +
+
+

+ Exam Result

+

+ A pie chart the gives the academic wise and total exam + results.

+ +
+
+

+ Student Strength

+

+ A line chart that gives the details related to the class + strength.

+ +
+
+

+ Average Marks

+

+ A bar chart that gives the details of average marks in + each class.

+ +
+
+

+ Rejected Applications

+

+ A bar chart that shows the count of accepted and rejected + applications.

+ +
+
+
+ + + +
+
+ +
+

+ Suggested + Products +

+
+
+
+ +
+
+ + + +
+
+ +
+

+ Our Services +

+
+
+
+
+
+ +
+
+ Odoo + Customization
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Support
+
+
+
+ +
+
+ Hire + Odoo + Developer
+
+
+
+ +
+
+ Odoo + Integration
+
+
+
+ +
+
+ Odoo + Migration
+
+
+
+ +
+
+ Odoo + Consultancy
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + + +
+
+ +
+

+ Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + + +
+
+ +
+

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ diff --git a/education_erp_dashboard/static/src/css/dashboard.css b/education_erp_dashboard/static/src/css/dashboard.css new file mode 100755 index 000000000..eeb9f38ce --- /dev/null +++ b/education_erp_dashboard/static/src/css/dashboard.css @@ -0,0 +1,176 @@ +.stat-icon { + width: 30%; + height: 65px; + text-align: center; + background: #ffa07a; + color: #fff; + padding-top: 2%; + font-size: xx-large; + display: inline-block; + border-radius: 10px; +} +.stat-content { + text-align: center; + color: black !important; + display: inline-block; + width: 50%; +} +.stat-count{ + text-align: center; + width: 50%; +} +.stat-head { + text-align: left !important; + font-weight: 300; + font-size: 18px; + margin-left: 10px; + width: 100%; +} +.stat-widget-one .stat-icon { + vertical-align: top; + margin: auto; + font-weight: 900; + display: inline-block; +} +.stat-widget-one{ + font-weight: bold; +} +.content-card-body { + display: flex; + justify-content: space-between; + align-items: center; +} +.stat-widget-one { + margin-top: 2.3rem; + margin-left: 1rem; +} +.stat-widget-one{ + margin-left: 1rem; + margin-top: -1px; + font-family: initial +} +.stat-widget-one .stat-icon{ + font-weight: 900; + display: inline-block; + color: #fff; +} +.stat-widget-one { + background-color: white; + text-align: left; +} +.stat-widget-one { + background: none; +} +.stat-widget-one .stat-icon { + text-align: center; + padding-top: 9px; +} +.stat-widget-one{ + margin: 0; + text-align: center; + width: 100% !important; + padding: 0; + color: #fff; +} +.stat-widget-one .stat-icon .fa { + font-size: 30px; + margin: 0px; + box-shadow: none; +} +.content-card { + font-size: 1rem; +} +.content-card:hover { + transform:none !important; + box-shadow: none !important; +} +.content-card { + padding-top: 0px; + padding: 0px; + margin-bottom: 1.5rem; + border-radius: 10px; + box-shadow: none; + background: none; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; +} +.content-card:hover { + transform: translateY(-2px) translateZ(0) !important; + box-shadow: 0 10px 10px 0 rgba(62, 57, 107, 0.12), 0 0 0 transparent !important; +} +.content-card { + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); +} +.content-card { + margin: 0; + margin-bottom: 0px; + margin-bottom: 0px; + padding-bottom: 7px; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); +} +.content-card { + background: #fafad2; + transition: transform 0.2s ease, box-shadow 0.2s ease; + will-change: transform, box-shadow; + box-shadow: 0 10px 40px 0 rgba(62,57,107,0.07), 0 2px 9px 0 rgba(62,57,107,0.06); + padding: 15px; +} + .content-card{ + transition: none !important; + will-change: none !important; + box-shadow: none !important; + margin-bottom: 5px; +} +.content-card:hover{ + transform: translateY(-2px) translateZ(0) !important; + box-shadow: 0 10px 10px 0 rgba(62, 57, 107, 0.12), 0 0 0 transparent !important; +} +.row{ + margin-right: 0px; !important; + padding:30px; +} +.stat-count { + font-size: 20px; + text-align: center; + color: #000 !important; + width: 100%; + float: left; +} +.render_graph_div { + text-align: center; + width: 100%; +} +.inline { + display: inline-block; + width: 50%; + float: left; + padding: 80px; +} +.pie_canvas{ + margin-left: 50px; + height: 400px; + width: 100%; + text-align: center; +} +.graph_canvas{ + margin-top: 30px; +} +.doughnut_canvas{ + margin-left: 50px; + height: 380px; + width: 100%; + text-align: center; + display: flex; +} +.pie-chart-filter{ + width: 50%; + margin-left:60px; +} +.doughnut-chart-filter{ + width: 50%; + margin-left:60px; +} diff --git a/education_erp_dashboard/static/src/js/dashboard.js b/education_erp_dashboard/static/src/js/dashboard.js new file mode 100755 index 000000000..88ed14697 --- /dev/null +++ b/education_erp_dashboard/static/src/js/dashboard.js @@ -0,0 +1,742 @@ +odoo.define("education_erp_dashboard.EducationalDashboard", function (require) { + "use strict"; + var AbstractAction = require('web.AbstractAction'); + var core = require('web.core'); + var QWeb = core.qweb; + var rpc = require('web.rpc'); + var DashBoard = AbstractAction.extend({ + contentTemplate: 'EducationalDashboard', + /* Loading the dashboard template */ + init: function(parent, context) { + this._super(parent, context); + this.dashboard_templates = ['MainSection']; + }, + /* Showing the total exam result and total attendance and hiding + the academic wise exam result and class wise attendance + when loading */ + start: function() { + var self = this; + self.set("title", 'Dashboard'); + return self._super().then(function() { + self.$('.academic_exam_result').hide(); + self.$('.exam_result').show(); + self.$('.class_attendance_today').hide(); + self.$('.total_attendance_today').show(); + /* Rendering the dashboard, graphs and filters */ + self.render_dashboards(); + self.render_graphs(); + self.render_filters(); + }); + }, + /* This function is called before the actual start */ + willStart: function(){ + var self = this; + return self._super() + }, + /* Function to render dashboard */ + render_dashboards: function() { + var self = this; + self.fetch_data() + var templates = [] + var templates = ['MainSection']; + _.each(templates, function(template) { + self.$('.o_hr_dashboard').append(QWeb.render(template, {widget: self})) + }); + }, + /* RPC call to fetch the count of applications, students, faculties, + amenities and total exams */ + fetch_data: function() { + var self = this; + rpc.query({ + model: 'erp.dashboard', + method: "erp_data", + }).then(function (result) { + self.$('#all_applications').append('' + result.applications + ''); + self.$('#all_students').append('' + result.students + ''); + self.$('#all_faculties').append('' + result.faculties + ''); + self.$('#all_amenities').append('' + result.amenities + ''); + self.$('#all_exams').append('' + result.exams + ''); + }); + }, + /* Click events for the tiles and change event for the filters */ + events:{ + 'click #all_applications':'application_list', + 'click #all_students':'student_list', + 'click #all_faculties':'faculty_list', + 'click #all_amenities':'amenity_list', + 'click #all_attendance':'attendance_list', + 'click #exams':'exam_result', + 'click #timetable':'timetable', + 'click #promotion':'promotions', + 'change #select_period': function(e){ + e.preventDefault(); + if(e.target.value == 'select'){ + this.$('.academic_exam_result').hide(); + this.$('.exam_result').show(); + this.render_exam_result_pie(); + } + else{ + this.$('.exam_result').hide(); + this.$('.academic_exam_result').show(); + this.get_academic_exam_result(e.target.value); + } + }, + 'change #select_class': function(e){ + e.preventDefault(); + if(e.target.value == 'select'){ + this.$('.class_attendance_today').hide(); + this.$('.total_attendance_today').show(); + this.render_attendance_doughnut(); + } + else{ + this.$('.total_attendance_today').hide(); + this.$('.class_attendance_today').show(); + this.get_class_attendance(e.target.value); + } + } + }, + /* Functions that to show the details on click event */ + /* Click event function to show the applications */ + application_list:function(e){ + e.preventDefault(); + this.do_action({ + type: "ir.actions.act_window", + name: "Applications", + res_model: "education.application", + views: [[false,'list'],[false,'form']], + target: 'current', + view_type : 'list', + view_mode : 'list', + }); + }, + /* Click event function to show the students */ + student_list:function(e){ + e.preventDefault(); + this.do_action({ + type: "ir.actions.act_window", + name: "Students", + res_model: "education.student", + views: [[false,'list'],[false,'form']], + target: 'current', + view_type : 'list', + view_mode : 'list', + }); + }, + /* Click event function to show the faculties */ + faculty_list:function(e){ + e.preventDefault(); + this.do_action({ + type: "ir.actions.act_window", + name: "Faculties", + res_model: "education.faculty", + views: [[false,'list'],[false,'form']], + target: 'current', + view_type : 'list', + view_mode : 'list', + }); + }, + /* Click event function to show the amenities */ + amenity_list:function(e){ + e.preventDefault(); + this.do_action({ + type: "ir.actions.act_window", + name: "Amenities", + res_model: "education.amenities", + views: [[false,'list'],[false,'form']], + target: 'current', + view_type : 'list', + view_mode : 'list', + }); + }, + /* Click event function to show the attendance list */ + attendance_list:function(e){ + e.preventDefault(); + this.do_action({ + type: "ir.actions.act_window", + name: "Attendance", + res_model: "education.attendance", + views: [[false,'list'],[false,'form']], + target: 'current', + view_type : 'list', + view_mode : 'list', + }); + }, + /* Click event function to show the exam results */ + exam_result:function(e){ + e.preventDefault(); + this.do_action({ + type: "ir.actions.act_window", + name: "Exam Result", + res_model: "education.exam", + views: [[false,'list'],[false,'form']], + target: 'current', + view_type : 'list', + view_mode : 'list', + }); + }, + /* Click event function to show the time table */ + timetable:function(e){ + e.preventDefault(); + this.do_action({ + type: "ir.actions.act_window", + name: "Timetable", + res_model: "education.timetable", + views: [[false,'list'],[false,'form']], + target: 'current', + view_type : 'list', + view_mode : 'list', + }); + }, + /* Click event function to show the promotions */ + promotions:function(e){ + e.preventDefault(); + this.do_action({ + type: "ir.actions.act_window", + name: "Student Promotions", + res_model: "education.student.final.result", + views: [[false,'list'],[false,'form']], + target: 'current', + view_type : 'list', + view_mode : 'list', + }); + }, + /* Calling the functions to creates charts */ + render_graphs:function(){ + var self = this; + self.render_total_application_graph(); + self.render_exam_result_pie(); + self.render_attendance_doughnut(); + self.render_rejected_accepted_applications(); + self.render_student_strength(); + self.render_class_wise_average_marks(); + }, + /* Calling the filter functions */ + render_filters:function(){ + var self = this; + self.render_pie_chart_filter(); + self.render_doughnut_chart_filter(); + }, + /* Function to create a bar chart to show application counts in each + academic year */ + render_total_application_graph:function(){ + var self = this + var ctx = self.$(".application_count"); + rpc.query({ + model: "erp.dashboard", + method: "get_all_applications", + }).then(function (result) { + var data = { + labels : Object.keys(result), + datasets: [{ + label: 'Application', + data: Object.values(result), + backgroundColor: [ + "#87cefa", + "#b0c4de", + "#20b2aa", + ], + borderColor: [ + "#87cefa", + "#b0c4de", + "#20b2aa", + ], + borderWidth: 1 + },] + }; + //Options to add appearance for the graph + var options = { + responsive: true, + title: false, + scales: { + yAxes: [{ + ticks: { + min: 0 + } + }] + } + }; + //Create Chart class object + new Chart(ctx, { + type: "bar", + data: data, + options: { + responsive:true, + maintainAspectRatio: false, + legend: { + display: false + }, + } + }); + }); + }, + /* Function to create a bar chart that shows the count of accepted and + rejected applications */ + render_rejected_accepted_applications:function(){ + var self = this + var ctx = self.$(".rejected_accepted_count"); + rpc.query({ + model: "erp.dashboard", + method: "get_rejected_accepted_applications", + }).then(function (result) { + var data = { + labels : Object.keys(result), + datasets: [{ + label: 'Application', + data: Object.values(result), + backgroundColor: [ + "#778899", + "#f08080", + ], + borderColor: [ + "#778899", + "#f08080", + ], + borderWidth: 1 + },] + }; + //Options to add appearance for the graph + var options = { + responsive: true, + title: false, + scales: { + yAxes: [{ + ticks: { + min: 0 + } + }] + } + }; + //Create Chart class object + new Chart(ctx, { + type: "bar", + data: data, + options: { + scales : { + y : { + beginAtZero: true, + suggestedMin: 0, + } + }, + responsive:true, + maintainAspectRatio: false, + legend: { + display: false + }, + } + }); + }); + }, + /* Function to create a pie chart that shows the exam results */ + chart_total_result : false, + render_exam_result_pie:function(){ + var self = this; + if (this.chart_total_result){ + this.chart_total_result.destroy() + } + var ctx = self.$(".exam_result")[0].getContext('2d'); + rpc.query({ + model: "erp.dashboard", + method: "get_exam_result" + }).then(function (result) { + var data; + if (! result.Fail && ! result.Pass){ + data = { + labels : ['No data'], + datasets: [{ + label: "No Result", + data: [1], + backgroundColor: [ + "#f6f7f9" + ], + borderColor: [ + "#f6f7f9" + ], + borderWidth: 1 + },] + }; + } + else{ + data = { + labels : Object.keys(result), + datasets: [{ + label: "Exam Result", + data: Object.values(result), + backgroundColor: [ + "#003f5c", + "#dc143c" + ], + borderColor: [ + "#003f5c", + "#dc143c", + ], + borderWidth: 1 + },] + }; + } + //Options to add appearance for the graph + var options = { + responsive: true, + title: false, + legend: { + display: true, + position: "bottom", + labels: { + fontColor: "#333", + fontSize: 16 + } + }, + scales: { + yAxes: [{ + ticks: { + min: 0, + } + }] + } + }; + /* Create Chart class object */ + self.chart_total_result = new Chart(ctx, { + type: "pie", + data: data, + options: options + }); + }); + }, + /* Function to create a doughnut chart that shows attendance details */ + chart_total_attendance : false, + render_attendance_doughnut:function(){ + var self = this; + if(this.chart_total_attendance){ + this.chart_total_attendance.destroy() + } + var ctx = self.$(".total_attendance_today")[0].getContext('2d'); + rpc.query({ + model: "erp.dashboard", + method: "get_attendance" + }).then(function (result) { + var data = { + labels : Object.keys(result), + datasets: [{ + label: "Attendance", + data: Object.values(result), + backgroundColor: [ + "#006400", + "#e9967a" + ], + borderColor: [ + "#006400", + "#e9967a", + ], + borderWidth: 1 + },] + }; + //Options to add appearance for the graph + var options = { + responsive: true, + title: false, + legend: { + display: true, + position: "bottom", + labels: { + fontColor: "#333", + fontSize: 16 + } + }, + scales: { + yAxes: [{ + ticks: { + min: 0, + } + }] + } + }; + /* Create Chart class object */ + self.chart_total_attendance = new Chart(ctx, { + type: "doughnut", + data: data, + options: options + }); + }); + }, + /* Function to create a line chart that shows the class wise student strength */ + render_student_strength:function(){ + var self = this + var ctx = self.$(".student_strength"); + rpc.query({ + model: "erp.dashboard", + method: "get_student_strength", + }).then(function (result) { + var data = { + labels : Object.keys(result), + datasets: [{ + label: 'Student Strength', + data: Object.values(result), + Color: [ + "#8b0000", + ], + borderColor: [ + "#8b0000", + ], + borderWidth: 1 + },] + }; + //Options to add appearance for the graph + var options = { + responsive: true, + title: false, + scales: { + yAxes: [{ + ticks: { + min: 0, + } + }] + } + }; + //Create Chart class object + new Chart(ctx, { + type: "line", + data: data, + options: { + responsive:true, + maintainAspectRatio: false, + legend: { + display: false + }, + } + }); + }); + }, + /* Function to create a bar chart that shows the average marks in each class */ + render_class_wise_average_marks:function(){ + var self = this + var ctx = self.$(".average_marks"); + rpc.query({ + model: "erp.dashboard", + method: "get_average_marks", + }).then(function (result) { + var data + if (Object.values(result) == 0){ + data = { + labels : ['No data'], + datasets: [{ + label: "No Marks", + data: [1], + backgroundColor: [ + "#f6f7f9" + ], + borderColor: [ + "#f6f7f9" + ], + borderWidth: 1 + },] + }; + } + else{ + data = { + labels : Object.keys(result), + datasets: [{ + label: 'Average Marks', + data: Object.values(result), + backgroundColor: [ + "#cd5c5c", + ], + borderColor: [ + "#cd5c5c", + ], + borderWidth: 1 + },] + }; + } + //Options to add appearance for the graph + var options = { + responsive: true, + title: false, + scales: { + yAxes: [{ + ticks: { + min: 0, + } + }] + } + }; + /* Create Chart class object */ + new Chart(ctx, { + type: "bar", + data: data, + options: { + scales : { + y : { + beginAtZero: true, + suggestedMin: 0, + } + }, + + responsive:true, + maintainAspectRatio: false, + legend: { + display: false + } + } + }); + }); + }, + /* Function to add the filter option */ + render_pie_chart_filter:function(){ + var self = this + rpc.query({ + model: "erp.dashboard", + method: "get_academic_year", + }).then(function (result) { + self.$('#select_period').append('') + for (let key in result){ + self.$('#select_period').append('') + } + }) + }, + /* Function to get academic wise exam result and to create chart accordingly */ + chart_academy_result : false, + get_academic_exam_result:function(academic_year){ + var self = this; + if (this.chart_academy_result){ + this.chart_academy_result.destroy() + } + var ctx = self.$(".academic_exam_result")[0].getContext('2d'); + rpc.query({ + model: "erp.dashboard", + method: "get_academic_year_exam_result", + args: [academic_year] + }).then(function (result) { + var data + if (! result.Fail && ! result.Pass){ + data = { + labels : ['No data'], + datasets: [{ + label: "No Result", + data: [1], + backgroundColor: [ + "#f6f7f9" + ], + borderColor: [ + "#f6f7f9" + ], + borderWidth: 1 + },] + }; + } + else{ + data = { + labels : Object.keys(result), + datasets: [{ + label: "Exam Result", + data: Object.values(result), + backgroundColor: [ + "#003f5c", + "#dc143c" + ], + borderColor: [ + "#003f5c", + "#dc143c", + ], + borderWidth: 1 + },] + }; + } + //Options to add appearance for the graph + var options = { + responsive: true, + title: false, + legend: { + display: true, + position: "bottom", + labels: { + fontColor: "#333", + fontSize: 16 + } + }, + scales: { + yAxes: [{ + ticks: { + min: 0, + } + }] + } + }; + self.chart_academy_result = new Chart(ctx, { + type: "pie", + data: data, + options: options + }); + }); + }, + /* Function to add filter option for doughnut chart */ + render_doughnut_chart_filter:function(){ + var self = this + rpc.query({ + model: "erp.dashboard", + method: "get_classes", + }).then(function (result) { + self.$('#select_class').append('') + for (let key in result){ + self.$('#select_class').append('') + } + }) + }, + /* Function to get class wise attendance and to create chart accordingly */ + chart_class_attendance : false, + get_class_attendance:function(clas){ + var self = this; + if(this.chart_class_attendance){ + this.chart_class_attendance.destroy() + } + var ctx = self.$(".class_attendance_today")[0].getContext('2d'); + rpc.query({ + model: "erp.dashboard", + method: "get_class_attendance_today", + args: [clas] + }).then(function (result) { + var data = { + labels : Object.keys(result), + datasets: [{ + label: "Attendance", + data: Object.values(result), + backgroundColor: [ + "#006400", + "#e9967a" + ], + borderColor: [ + "#006400", + "#e9967a" + ], + borderWidth: 1 + },] + }; + var options = { + responsive: true, + title: false, + legend: { + display: true, + position: "bottom", + labels: { + fontColor: "#333", + fontSize: 16 + } + }, + scales: { + yAxes: [{ + ticks: { + min: 0, + } + }] + } + }; + /* Create Chart class object */ + self.chart_class_attendance = new Chart(ctx, { + type: "doughnut", + data: data, + options: options + }); + }); + }, + }) + core.action_registry.add('erp_dashboard_tag', DashBoard); + return DashBoard; + }); diff --git a/education_erp_dashboard/static/src/xml/dashboard_content_templates.xml b/education_erp_dashboard/static/src/xml/dashboard_content_templates.xml new file mode 100755 index 000000000..564b1e910 --- /dev/null +++ b/education_erp_dashboard/static/src/xml/dashboard_content_templates.xml @@ -0,0 +1,228 @@ + + diff --git a/education_erp_dashboard/static/src/xml/dashboard_templates.xml b/education_erp_dashboard/static/src/xml/dashboard_templates.xml new file mode 100755 index 000000000..9f8b90b4e --- /dev/null +++ b/education_erp_dashboard/static/src/xml/dashboard_templates.xml @@ -0,0 +1,9 @@ + + + diff --git a/education_erp_dashboard/views/dashboard_tag_views.xml b/education_erp_dashboard/views/dashboard_tag_views.xml new file mode 100755 index 000000000..d4f1b2305 --- /dev/null +++ b/education_erp_dashboard/views/dashboard_tag_views.xml @@ -0,0 +1,9 @@ + + + + + Educational Dashboard + erp_dashboard_tag + current + + diff --git a/education_erp_dashboard/views/erp_dashboard_menu.xml b/education_erp_dashboard/views/erp_dashboard_menu.xml new file mode 100755 index 000000000..0a2cf3c71 --- /dev/null +++ b/education_erp_dashboard/views/erp_dashboard_menu.xml @@ -0,0 +1,11 @@ + + + + + + +