diff --git a/education_university_management/README.rst b/education_university_management/README.rst new file mode 100644 index 000000000..39963337c --- /dev/null +++ b/education_university_management/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +University Education Management +=============================== +A strong and complete user-friendly ERP solution designed specifically for college administration is University Educational ERP. Details such as student entrance, enrollment information, faculty records, class management, and subject administration are simple to administer. + +Configuration +============= +No additional configuration required + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------ +Developer : (V16) Raneesha M K, Contact : odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +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_university_management/__init__.py b/education_university_management/__init__.py new file mode 100644 index 000000000..0c5fbe8e4 --- /dev/null +++ b/education_university_management/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 controllers +from . import models +from . import wizard diff --git a/education_university_management/__manifest__.py b/education_university_management/__manifest__.py new file mode 100644 index 000000000..39e96722a --- /dev/null +++ b/education_university_management/__manifest__.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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': ' University Education Management', + 'version': '16.0.1.0.0', + 'category': 'Industries', + 'summary': """This modules helps to manage the university + education system""", + 'description': """This module serves as a comprehensive solution for + efficiently managing the education system of a university enhancing + its overall functionality and user experience.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['mail', 'hr_recruitment', 'account', 'website'], + 'data': [ + 'security/education_university_management_groups.xml', + 'security/ir.model.access.csv', + 'data/ir_sequence_data.xml', + 'data/online_application_menu_data.xml', + 'data/mail_template_data.xml', + 'wizard/application_reject_views.xml', + 'views/education_university_management_menus.xml', + 'views/res_partner_views.xml', + 'views/fee_category_views.xml', + 'views/account_journal_views.xml', + 'views/fee_types_views.xml', + 'views/fee_structure_views.xml', + 'views/account_move_views.xml', + 'views/timetable_period_views.xml', + 'views/university_exam_type_views.xml', + 'views/university_exam_views.xml', + 'views/exam_valuation_views.xml', + 'views/exam_result_views.xml', + 'views/university_timetable_views.xml', + 'views/timetable_schedule_line_views.xml', + 'views/university_application_views.xml', + 'views/university_attendace_views.xml', + 'views/university_attendance_line_views.xml', + 'views/university_student_views.xml', + 'views/university_document_type_views.xml', + 'views/university_document_views.xml', + 'views/reject_reason_views.xml', + 'views/university_course_views.xml', + 'views/university_department_views.xml', + 'views/university_subject_views.xml', + 'views/university_semester_views.xml', + 'views/university_syllabus_views.xml', + 'views/university_academic_year_views.xml', + 'views/university_batch_views.xml', + 'views/university_faculty_views.xml', + 'views/student_portal_templates.xml', + 'views/online_application_templates.xml', + ], + 'demo': ['demo/education_university_management_demo.xml'], + 'assets': { + 'web.assets_frontend': [ + '/education_university_management/static/src/css/web_style.css', + '/education_university_management/static/src/js/online_application.js' + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': True, +} diff --git a/education_university_management/controllers/__init__.py b/education_university_management/controllers/__init__.py new file mode 100644 index 000000000..49524706c --- /dev/null +++ b/education_university_management/controllers/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 education_online_application +from . import education_university_management diff --git a/education_university_management/controllers/education_online_application.py b/education_university_management/controllers/education_online_application.py new file mode 100644 index 000000000..f1c3c1cdf --- /dev/null +++ b/education_university_management/controllers/education_online_application.py @@ -0,0 +1,93 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 . +# +############################################################################### +import base64 +from odoo import http +from odoo.http import request + + +class OnlineAdmission(http.Controller): + """Controller for taking online admission""" + + @http.route('/university', type='http', auth='public', website=True) + def university_contact_us(self): + """To redirect to contact page.""" + return request.render('education_university_management.university') + + @http.route('/applyonline', type='http', auth='public', website=True) + def online_admission(self): + """To pass certain default field values + to the website registration form.""" + vals = { + 'department': request.env['university.department'].sudo().search( + []), + 'course': request.env['university.course'].sudo().search([]), + 'semester': request.env['university.semester'].sudo().search([]), + 'year': request.env['university.academic.year'].sudo().search([]), + 'doc_type': request.env['university.document.type'].sudo().search([ + ]) + } + return request.render( + 'education_university_management.online_admission', + vals) + + @http.route('/admission/submit', type='http', auth='public', + website=True) + def register_admission(self, **vals): + """ This will create a new student application with the values.""" + if vals: + guardian = request.env['res.partner'].sudo().create({ + 'name': vals.get('father'), + 'is_parent': True + }) + application = request.env[ + 'university.application'].sudo().create({ + 'name': vals.get('first_name'), + 'last_name': vals.get('last_name'), + 'mother_name': vals.get('mother'), + 'father_name': vals.get('father'), + 'mobile': vals.get('phone'), + 'email': vals.get('email'), + 'date_of_birth': vals.get('date'), + 'academic_year_id': vals.get('academic_year'), + 'mother_tongue': vals.get('tongue'), + 'course_id': vals.get('course'), + 'department_id': vals.get('department'), + 'semester_id': vals.get('semester'), + 'street': vals.get('communication_address'), + 'per_street': vals.get('communication_address'), + 'guardian_id': guardian.id, + 'image': base64.b64encode((vals.get('image')).read()) + }) + doc_attachment = request.env['ir.attachment'].sudo().create({ + 'name': vals.get('doc').filename, + 'res_name': 'Document', + 'type': 'binary', + 'datas': base64.encodebytes((vals.get('doc')).read()), + }) + request.env['university.document'].sudo().create({ + 'document_type_id': vals.get('doc_type'), + 'attachment_ids': doc_attachment, + 'application_ref_id': application.id + }) + + return request.render( + "education_university_management.submit_admission", {}) diff --git a/education_university_management/controllers/education_university_management.py b/education_university_management/controllers/education_university_management.py new file mode 100644 index 000000000..36626667b --- /dev/null +++ b/education_university_management/controllers/education_university_management.py @@ -0,0 +1,114 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 http +from odoo.http import request, route +from odoo.addons.portal.controllers.portal import CustomerPortal + + +class StudentPortal(CustomerPortal): + """Controller for creating a new portal design for student users""" + + @http.route(['/home'], type='http', auth="user", website=True) + def student_portal(self): + """New portal for student users""" + return request.render("education_university_management.student_portal") + + @http.route(['/student/info'], type='http', auth="user", website=True) + def student_info(self): + """Get basic details of students in the university""" + values = request.env['university.student'].sudo().search( + [('partner_id', '=', request.env.user.partner_id.id)]) + full_name = values.name + if values.middle_name: + full_name = full_name + ' ' + values.middle_name + if values.last_name: + full_name = full_name + ' ' + values.last_name + if values.gender == 'female': + gender = 'Female' + elif values.gender == 'male': + gender = 'Male' + else: + gender = 'Other' + vals = { + 'full_name': full_name, + 'student': values, + 'gender': gender, + } + return request.render("education_university_management.student_info", + {'values': vals}) + + @http.route(['/student/documents'], type='http', auth="user", website=True) + def student_documents(self): + """Get documents of students in the university""" + student = request.env['university.student'].sudo().search([( + 'partner_id', + '=', + request.env.user.partner_id.id)]).application_id + docs = request.env['university.document'].sudo().search( + [('application_ref_id', '=', student.id)]) + attachment = request.env['ir.attachment'].sudo().browse( + docs.attachment_ids.ids) + attachment.public = True + return request.render( + "education_university_management.student_documents", + {'docs': docs}) + + @http.route(['/student/exam/results'], type='http', auth="user", + website=True) + def student_exam_result(self): + """Get exam results of students in the university""" + student = request.env['university.student'].sudo().search( + [('partner_id', '=', request.env.user.partner_id.id)]) + exam = request.env['exam.result'].sudo().search( + [('student_id', '=', student.id)]) + return request.render( + "education_university_management.student_exam_result", + {'data': exam}) + + @http.route(['/student/result'], type='http', auth="user", + website=True) + def exam_subject(self): + """Get subject wise exam results of students in the university""" + student = request.env['university.student'].sudo().search([( + 'partner_id', + '=', + request.env.user.partner_id.id)]) + exam = request.env['exam.result'].sudo().search( + [('student_id', '=', student.id)]) + line = request.env['results.subject.line'].sudo().search( + [('result_id', '=', exam.id)]) + data = { + 'exam': exam, + 'line': line + } + return request.render( + "education_university_management.student_result", data) + + @route(['/my', '/my/home'], type='http', auth="user", website=True) + def home(self, **kw): + """ Overrided If the logged in user is a student, + they will be directed to the student portal.""" + values = self._prepare_portal_layout_values() + if not request.env.user.partner_id.is_student: + return request.render("portal.portal_my_home", values) + else: + return request.redirect('/home') diff --git a/education_university_management/data/ir_sequence_data.xml b/education_university_management/data/ir_sequence_data.xml new file mode 100644 index 000000000..7683b544d --- /dev/null +++ b/education_university_management/data/ir_sequence_data.xml @@ -0,0 +1,32 @@ + + + + + + Student Documents + university.document + DOC/%(range_year)s/ + + + + 3 + + + + + Student Application + university.application + SA + 3 + + + + + Student + university.student + + 4 + + + + diff --git a/education_university_management/data/mail_template_data.xml b/education_university_management/data/mail_template_data.xml new file mode 100644 index 000000000..9ce7cd781 --- /dev/null +++ b/education_university_management/data/mail_template_data.xml @@ -0,0 +1,279 @@ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + +
+ + Welcome to Odoo + +
+ + + Marc Demo + + +
+ +
+
+
+
+ + + + + + + + + + + + + + +
+
+ Dear + Marc Demo, +
+
+ You have been + invited by + OdooBot + to connect on Odoo + Student Portal. +
+
+
+ Your sign in email + is: + + + mark.brown23@example.com + + +
+ And click on the + button below to pick + a password and + activate your + account. +
+
+
+ +
+
+
+ Enjoy Odoo! +
+ --
The + YourCompany + Team +
+
+
+ Dear + Marc Demo, +
+
+ You have been + invited by + OdooBot + of + YourCompany + to connect on Odoo. + + + + Your Odoo domain is: + + + http://yourcompany.odoo.com + + +
+ Your sign in email + is: + + + mark.brown23@example.com + + +
+
+ Never heard of Odoo? + It’s an all-in-one + business software + loved by 7+ million + users. It will + considerably improve + your experience at + work and increase + your productivity. +
+
+ Have a look at the + Odoo Tour + to discover the + tool. +
+
+ Enjoy Odoo! +
+ --
The + YourCompany + Team +
+
+
+
+
+ + + + + + + +
+ + YourCompany + +
+ + +1 650-123-4567 + + + | + + info@yourcompany.com + + + + | + + http://www.example.com + + +
+
+
+ + + + +
+ Powered by + Odoo + +
+
+
+ {{ object.lang }} + +
+ + + + + + +
diff --git a/education_university_management/data/online_application_menu_data.xml b/education_university_management/data/online_application_menu_data.xml new file mode 100644 index 000000000..5630984f4 --- /dev/null +++ b/education_university_management/data/online_application_menu_data.xml @@ -0,0 +1,12 @@ + + + + + + University + /university + + 80 + + + diff --git a/education_university_management/demo/education_university_management_demo.xml b/education_university_management/demo/education_university_management_demo.xml new file mode 100644 index 000000000..1b33d7471 --- /dev/null +++ b/education_university_management/demo/education_university_management_demo.xml @@ -0,0 +1,202 @@ + + + + + + 2022-2023 + 2022-06-01 + 2023-04-01 + 1 + + + + TC + Transfer Certificate + + + + Birth Certificate + Birth Certificate of the student + + + + Low Marks + + + + Degree + ug + 6 + + + + BTech + ug + 8 + + + + Computer Science + CSE + + + + + Economics + BA.ECO + + + + + English + ENG + compulsory + 1 + 3 + + + + Basics of Python + PYTHON + compulsory + 4 + + + + Physics + PHY + compulsory + 4 + + + + Chemistry + CHE + compulsory + 4 + + + + 6 + + + + + + + 30 + + + + Period 1 + 10.00 + 11.00 + + + + Period 2 + 11.00 + 12.00 + + + + John + Aryan + 1993-02-25 + johnaryan@gmail.com + +916745397801 + + + + + Adams + O + 1993-02-25 + adams@gmail.com + +919967934500 + + + + + First Internal + internal + + + + First Semester + sem + + + + Daniel George + daniel@gmail.com + + Banglore + 530068 + + 560003 Majestic + + + + Joseph Alex + joseph@cybrosys.com + + Calicut + 670645 + + 670645 Calicut + + + + John + Daniel + Smith + 2018-06-06 00:00:00 + + + + + + Daniel George + Lissa Abraham + + 1994-11-11 + male + a+ + Banglore + 1 + 9998889988 + danielsmith@gmail.com + + + + + Alana + Joseph + 2018-06-06 00:00:00 + + + + + Joseph Alex + Smitha + + 1994-11-11 + female + o+ + Kochi + 1 + 8936458900 + alana@gmail.com + + + + diff --git a/education_university_management/doc/RELEASE_NOTES.md b/education_university_management/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..a3551595f --- /dev/null +++ b/education_university_management/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 06.01.2024 +#### Version 16.0.1.0.0 +#### ADD +Initial Commit University Education Management diff --git a/education_university_management/models/__init__.py b/education_university_management/models/__init__.py new file mode 100644 index 000000000..c29b108b0 --- /dev/null +++ b/education_university_management/models/__init__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 account_journal +from . import account_move +from . import exam_result +from . import exam_subject_line +from . import exam_valuation +from . import exam_valuation_line +from . import fee_category +from . import fee_structure +from . import fee_structure_line +from . import fee_type +from . import reject_reason +from . import res_partner +from . import results_subject_line +from . import timetable_period +from . import timetable_schedule_line +from . import university_academic_year +from . import university_application +from . import university_attendance +from . import university_attendance_line +from . import university_batch +from . import university_course +from . import university_department +from . import university_document +from . import university_document_type +from . import university_exam +from . import university_exam_type +from . import university_faculty +from . import university_semester +from . import university_student +from . import university_subject +from . import university_syllabus +from . import university_timetable diff --git a/education_university_management/models/account_journal.py b/education_university_management/models/account_journal.py new file mode 100644 index 000000000..a69f087f7 --- /dev/null +++ b/education_university_management/models/account_journal.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 fields, models + + +class AccountJournal(models.Model): + """Inherited account.journal model for adding a field to + determine the journal is fee journal or not""" + _inherit = 'account.journal' + + is_fee = fields.Boolean('Is University fee?', default=False, + help="Enable if the journal for university " + "fee management") diff --git a/education_university_management/models/account_move.py b/education_university_management/models/account_move.py new file mode 100644 index 000000000..f7bab69b8 --- /dev/null +++ b/education_university_management/models/account_move.py @@ -0,0 +1,114 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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, _ +from odoo.exceptions import ValidationError + + +class AccountMove(models.Model): + """Inheriting account move model for creating receipt for students fees""" + _inherit = 'account.move' + + student_id = fields.Many2one('university.student', + string='Admission No', + help="Select student for creating fee " + "receipt") + student_name = fields.Char(string='Name', + help="Student name that your going to " + "make receipt", store=True, + related='student_id.partner_id.name') + semester_id = fields.Many2one(related='student_id.semester_id', + help="Semester of the student", + string='Semester') + batch_id = fields.Many2one(related='student_id.batch_id', + help="batch of the student", ) + fee_structure_id = fields.Many2one('fee.structure', + help="Select a fee structure", + string='Fee Structure') + fee_structure_ids = fields.Many2many('fee.structure', + string="Fee Structure", + compute="_compute_fee_structure_ids", + help="Select a fee structure", ) + is_fee = fields.Boolean(string='Is Fee', store=True, default=False, + help="To determine whether the account " + "move is for fee or not") + fee_category_id = fields.Many2one('fee.category', + help="Select a fee category", + string='Category') + partner_id = fields.Many2one(related='student_id.partner_id', + help="Set student partner in customer", ) + journal_id = fields.Many2one(related='fee_category_id.journal_id', + help="Journal of the receipt") + + @api.model + def create(self, vals): + """ This method overrides the create method to add two fields to the + invoice: 'is_fee' and 'student_name'.The 'is_fee' field is used to + display fee items only in the fee tree view. + + :param vals (dict): Dictionary containing the field values for the + new invoice record. + :returns class:`~account.move`: The created invoice record. + """ + partner = self.env['res.partner'].browse(vals.get('partner_id')) + if vals.get('fee_category_id'): + vals.update({ + 'is_fee': True, + 'student_name': partner.name + }) + res = super(AccountMove, self).create(vals) + return res + + @api.onchange('fee_structure_id') + def _onchange_fee_structure_id(self): + """Set default fee lines based on selected fee structure""" + lines = [] + self.invoice_line_ids = False + for item in self: + for line in item.fee_structure_id.structure_line_ids: + name = line.fee_type_id.product_id.description_sale + if not name: + name = line.fee_type_id.product_id.name + fee_line = { + 'price_unit': line.fee_amount, + 'quantity': 1.00, + 'product_id': line.fee_type_id.product_id, + 'name': name, + 'account_id': item.journal_id.default_account_id + } + lines.append((0, 0, fee_line)) + item.invoice_line_ids = lines + + @api.depends('fee_category_id') + def _compute_fee_structure_ids(self): + """ To find the fee structure in the selected category and assign them + to fee_structure_ids field for setting domain for + fee_category_id field """ + for rec in self: + if rec.fee_category_id: + rec.fee_structure_ids = self.env['fee.structure'].search( + [('category_id', '=', rec.fee_category_id.id)]).ids + if not rec.fee_structure_ids: + raise ValidationError( + _("No Fee Structure found for selected Category, " + "Please choose another one")) + else: + rec.fee_structure_ids = False diff --git a/education_university_management/models/exam_result.py b/education_university_management/models/exam_result.py new file mode 100644 index 000000000..baa5504de --- /dev/null +++ b/education_university_management/models/exam_result.py @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 ExamResult(models.Model): + """Creating a model for storing students exam result.""" + _name = 'exam.result' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "Exam Result" + + name = fields.Char(string='Name', help="Name of the exam result") + exam_id = fields.Many2one('university.exam', string='Exam', + help="Which exam does this result belong to") + batch_id = fields.Many2one('university.batch', string='Batch', + help="Which batch does this result belong to") + student_id = fields.Many2one('university.student', + string='Student', help="Result of student") + subject_line_ids = fields.One2many('results.subject.line', + 'result_id', + help="Result of each subject in exam", + string='Subjects') + academic_year_id = fields.Many2one(related='batch_id.academic_year_id', + help="Academic year of the batch", + string='Academic Year') + company_id = fields.Many2one( + 'res.company', string='Company', help="Which company's " + "result is", + default=lambda self: self.env.company) + total_pass_mark = fields.Float(string='Total Pass Mark', store=True, + help="Total mark to pass the exam", + readonly=True, compute='_total_marks_all') + total_max_mark = fields.Float(string='Total Max Mark', store=True, + help="Maximum mark of the exam", + readonly=True, + compute='_compute_total_marks') + total_mark_scored = fields.Float(string='Total Marks Scored', store=True, + help="Total mark scored by student", + readonly=True, + compute='_compute_total_marks') + is_overall_pass = fields.Boolean(string='Overall Pass/Fail', store=True, + help="Overall pass or fail ratio", + readonly=True, + compute='_compute_total_marks') + + @api.depends('subject_line_ids.mark_scored') + def _compute_total_marks(self): + """This method is for computing total mark scored and overall + pass details""" + for results in self: + total_pass_mark = 0 + total_max_mark = 0 + total_mark_scored = 0 + is_overall_pass = True + for subjects in results.subject_line_ids: + total_pass_mark += subjects.pass_mark + total_max_mark += subjects.max_mark + total_mark_scored += subjects.mark_scored + if not subjects.is_pass: + is_overall_pass = False + results.total_pass_mark = total_pass_mark + results.total_max_mark = total_max_mark + results.total_mark_scored = total_mark_scored + results.is_overall_pass = is_overall_pass diff --git a/education_university_management/models/exam_subject_line.py b/education_university_management/models/exam_subject_line.py new file mode 100644 index 000000000..b82678670 --- /dev/null +++ b/education_university_management/models/exam_subject_line.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 fields, models + + +class ExamSubjectLine(models.Model): + """For managing the subjects in the exam""" + _name = 'exam.subject.line' + _description = 'Subject Line of Exam' + + subject_id = fields.Many2one('university.subject', + string='Subject', required=True, + help="Select subjects of exam") + date = fields.Date(string='Date', required=True, + help="Select date of the subject") + time_from = fields.Float(string='Time From', required=True, + help="Enter starting time of the subject") + time_to = fields.Float(string='Time To', required=True, + help="Enter ending time of the subject") + mark = fields.Integer(string='Mark', help="Enter mark for the subject") + exam_id = fields.Many2one('university.exam', string='Exam', + help="Relation to exam model") + company_id = fields.Many2one( + 'res.company', string='Company', help="Company of the exam", + default=lambda self: self.env.company) diff --git a/education_university_management/models/exam_valuation.py b/education_university_management/models/exam_valuation.py new file mode 100644 index 000000000..8e3d0aac7 --- /dev/null +++ b/education_university_management/models/exam_valuation.py @@ -0,0 +1,183 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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, _ +from odoo.exceptions import UserError + + +class ExamValuation(models.Model): + """Used to manage the valuation of exams""" + _name = 'exam.valuation' + _description = "Exam Valuation" + _inherit = ['mail.thread', 'mail.activity.mixin'] + + name = fields.Char(string='Name', default='New', help="Name of the record") + exam_id = fields.Many2one('university.exam', string='Exam', + required=True, help="Select exam for valuation", + domain=[('state', '=', 'ongoing')]) + batch_id = fields.Many2one(related='exam_id.batch_id', string='Batch', + help="Choose the batch that you want to" + " evaluate", required=True) + evaluator_id = fields.Many2one('university.faculty', + string='Evaluator', + help="Select a valuation evaluator") + mark = fields.Float(string='Max Mark', + help="Maximum mark of the selected subject", + required=True) + pass_mark = fields.Float(string='Pass Mark', + help="Mark needed to pass the exam ", + required=True) + state = fields.Selection([('draft', 'Draft'), + ('completed', 'Completed'), + ('cancel', 'Canceled')], default='draft', + help="Status of the valuation") + valuation_line_ids = fields.One2many('exam.valuation.line', + 'valuation_id', + help="Students valuation details", + string='Students') + subject_id = fields.Many2one('university.subject', + string='Subject', + help="Choose subject of the exam for " + "valuation", required=True) + subject_ids = fields.Many2many('university.subject', + string="Subjects", + help="Subjects under the exam", + compute="_compute_subject_ids") + is_mark_sheet_created = fields.Boolean(string='Mark sheet Created', + help="Enable if a mark sheet for " + "the students in the batch is " + "created or not") + date = fields.Date(string='Date', default=fields.Date.today, + help="Date of the valuation") + academic_year_id = fields.Many2one(related='batch_id.academic_year_id', + string='Academic Year', + help="Academic year of the selected " + "batch") + company_id = fields.Many2one( + 'res.company', string='Company', + help="Company of the valuation", default=lambda self: self.env.company) + + def action_create_mark_sheet(self): + """Button action for creating marksheet of students""" + students = self.batch_id.batch_student_ids + if len(students) < 1: + raise UserError(_('There are no students in this Batch')) + self.env['exam.valuation.line'].create(({'student_id': student.id, + 'valuation_id': self.id, + }) for student in students) + self.is_mark_sheet_created = True + + @api.model + def create(self, vals): + """ This method overrides the create method to check if the exam + valuation with respect to the subject and batch has already + been completed. + + :param vals (dict): Dictionary containing the field values for + the new exam valuation record. + :returns class:`exam.valuation`The created exam valuation record. + :raises UserError: If a valuation sheet for the specified subject, + division, and exam already exists. + """ + res = super(ExamValuation, self).create(vals) + search_valuation = self.env['exam.valuation'].search( + [('exam_id', '=', res.exam_id.id), + ('batch_id', '=', res.batch_id.id), + ('subject_id', '=', res.subject_id.id), + ('state', '!=', 'cancel')]) + if len(search_valuation) > 1: + raise UserError( + _('Valuation Sheet for \n Subject --> %s \nDivision --> %s ' + '\nExam --> %s \n is already created') % ( + res.subject_id.name, res.batch_id.name, + res.exam_id.name)) + return res + + @api.depends('exam_id') + def _compute_subject_ids(self): + """ To find the subjects in the selected exam and assign them + to subject_ids field for setting domain for subject_id field. + """ + for rec in self: + rec.subject_ids = rec.exam_id.subject_line_ids.subject_id \ + if rec.exam_id else False + + def action_valuation_completed(self): + """Method for completing the valuation and also creating the exam + result with the valuation line and verify whether or not the exam + with the subject and the student already exists; if not, a new exam + result will be created.""" + self.name = str(self.exam_id.name) + result_obj = self.env['exam.result'] + result_line_obj = self.env['results.subject.line'] + for students in self.valuation_line_ids: + search_result = result_obj.search( + [('exam_id', '=', self.exam_id.id), + ('batch_id', '=', self.batch_id.id), + ('student_id', '=', students.student_id.id)]) + if len(search_result) < 1: + result_data = { + 'name': self.name, + 'exam_id': self.exam_id.id, + 'batch_id': self.batch_id.id, + 'student_id': students.student_id.id, + } + result = result_obj.create(result_data) + result_line_data = { + 'name': self.name, + 'subject_id': self.subject_id.id, + 'max_mark': self.mark, + 'pass_mark': self.pass_mark, + 'mark_scored': students.mark_scored, + 'is_pass': students.is_pass, + 'result_id': result.id, + } + result_line_obj.create(result_line_data) + else: + result_line_data = { + 'subject_id': self.subject_id.id, + 'max_mark': self.mark, + 'pass_mark': self.pass_mark, + 'mark_scored': students.mark_scored, + 'is_pass': students.is_pass, + 'result_id': search_result.id, + } + result_line_obj.create(result_line_data) + self.state = 'completed' + + def action_set_to_draft(self): + """Method to set the record to the draft stage, + and it will unlink all exam results with this valuation.""" + for students in self.valuation_line_ids: + search_result = self.env['exam.result'].search( + [('exam_id', '=', self.exam_id.id), + ('batch_id', '=', self.batch_id.id), + ('student_id', '=', students.student_id.id)]) + search_result_line = self.env['results.subject.line'].search( + [('result_id', '=', search_result.id), + ('subject_id', '=', self.subject_id.id)]) + search_result_line.unlink() + search_result.unlink() + self.state = 'draft' + + def action_cancel_valuation(self): + """Action to cancel the valuation""" + self.state = 'cancel' diff --git a/education_university_management/models/exam_valuation_line.py b/education_university_management/models/exam_valuation_line.py new file mode 100644 index 000000000..c2c060dda --- /dev/null +++ b/education_university_management/models/exam_valuation_line.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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, _ +from odoo.exceptions import UserError + + +class ExamValuationLine(models.Model): + """Used to record the students pass mark details while valuing the exam""" + _name = 'exam.valuation.line' + _description = 'Exam Valuation Line' + + student_id = fields.Many2one('university.student', + string='Students', + help="Students of batch") + mark_scored = fields.Float(string='Mark', + help="Scored mark of the student") + is_pass = fields.Boolean(string='Pass/Fail', + help="Enable if the student pass the exam", + default=False) + valuation_id = fields.Many2one('exam.valuation', + help="relation to exam valuation model", + string='Valuation Id') + + @api.onchange('mark_scored', 'is_pass') + def _onchange_mark_scored(self): + """to determine whether the scored mark exceeds the subject's + maximum mark and determine pass/fail depending on the scored mark.""" + if self.mark_scored > self.valuation_id.mark: + raise UserError(_('Mark Scored must be less than Max Mark')) + self.is_pass = True if \ + self.mark_scored >= self.valuation_id.pass_mark else False diff --git a/education_university_management/models/fee_category.py b/education_university_management/models/fee_category.py new file mode 100644 index 000000000..306818e86 --- /dev/null +++ b/education_university_management/models/fee_category.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 fields, models + + +class FeeCategory(models.Model): + """For managing the categories for university fees""" + _name = 'fee.category' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "Categories of university fees" + + name = fields.Char('Name', required=True, + help='Create a fee category suitable for institution.' + ' Like Institutional, Hostel, Transportation, ' + 'Arts and Sports, etc') + journal_id = fields.Many2one('account.journal', + domain="[('is_fee', '=', 'True')]", + required=True, string='Journal', + help='Setting up of unique journal ' + 'for each category help to distinguish ' + 'account entries of each category ') diff --git a/education_university_management/models/fee_structure.py b/education_university_management/models/fee_structure.py new file mode 100644 index 000000000..c48f31ec4 --- /dev/null +++ b/education_university_management/models/fee_structure.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 FeeStructure(models.Model): + """Managing the fee structure for university students""" + _name = 'fee.structure' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "Fees structure of university" + + name = fields.Char('Name', required=True, + help="Enter the name of fee structure") + currency_id = fields.Many2one('res.currency', string="Currency", + default=lambda + self: self.env.user.company_id.currency_id.id, + help="Currency of current company") + structure_line_ids = fields.One2many('fee.structure.line', + 'fee_structure_id', + string='Fee Types', + help="Fee structure line") + description = fields.Text(string="Additional Information", + help="Any additional information about") + academic_year_id = fields.Many2one('university.academic.year', + help="Choose academic year", + string='Academic Year', required=True) + amount_total = fields.Float(string="Amount", currency_field='currency_id', + help="Total amount of the lines", + required=True, compute='_compute_total') + category_id = fields.Many2one('fee.category', string='Category', + help="Select th category for structure", + required=True) + + @api.depends('structure_line_ids.fee_amount') + def _compute_total(self): + """Method for computing total amount of the structure lines""" + self.amount_total = sum( + line.fee_amount for line in self.structure_line_ids) diff --git a/education_university_management/models/fee_structure_line.py b/education_university_management/models/fee_structure_line.py new file mode 100644 index 000000000..15e294fff --- /dev/null +++ b/education_university_management/models/fee_structure_line.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 FeeStructureLines(models.Model): + _name = 'fee.structure.line' + _description = "Fee Structure lines" + + fee_structure_id = fields.Many2one('fee.structure', + help="Relation to fee.structure", + string='Fee Structure', + ondelete='cascade', index=True) + category_id = fields.Many2one(related='fee_structure_id.category_id', + string="Category", + help="Fee category of structure") + fee_type_id = fields.Many2one('fee.type', string='Fee', + required=True, help="Select fee types") + currency_id = fields.Many2one('res.currency', string="Currency", + default=lambda + self: self.env.user.company_id.currency_id.id, + help="Currency of current company") + fee_amount = fields.Float('Amount', required=True, + help="Amount of the each fee type", + related='fee_type_id.lst_price') + payment_type = fields.Selection(string='Payment Type', + help="Payment type of fee type", + related="fee_type_id.payment_type") + fee_description = fields.Text('Description', help="Fee type " + "description", + related='fee_type_id.description_sale') diff --git a/education_university_management/models/fee_type.py b/education_university_management/models/fee_type.py new file mode 100644 index 000000000..7a99adb5f --- /dev/null +++ b/education_university_management/models/fee_type.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 fields, models + + +class FeeTypes(models.Model): + """For managing payment method or type of student fees""" + _name = 'fee.type' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _inherits = {'product.product': 'product_id'} + _description = 'University fees' + + payment_type = fields.Selection([ + ('onetime', 'One Time'), + ('permonth', 'Per Month'), + ('peryear', 'Per Year'), + ('sixmonth', '6 Months'), + ('threemonth', '3 Months')], + string='Payment Type', default='permonth', + help='Payment type describe how much a payment effective') + category_id = fields.Many2one('fee.category', string='Category', + help="Category of fee types", + required=True) + currency_id = fields.Many2one('res.currency', string="Currency", + default=lambda + self: self.env.user.company_id.currency_id.id, + help="Currency of current company") diff --git a/education_university_management/models/reject_reason.py b/education_university_management/models/reject_reason.py new file mode 100644 index 000000000..1b2822897 --- /dev/null +++ b/education_university_management/models/reject_reason.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 fields, models + + +class RejectReason(models.Model): + """For managing rejection reasons for an application""" + _name = 'reject.reason' + _description = "Application reject reasons" + + name = fields.Char(string="Name", help="Reject Reasons of application") diff --git a/education_university_management/models/res_partner.py b/education_university_management/models/res_partner.py new file mode 100644 index 000000000..1a787257f --- /dev/null +++ b/education_university_management/models/res_partner.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 fields, models + + +class ResPartner(models.Model): + """Inherited model for adding two fields to determine + whether the partner student or parent""" + _inherit = 'res.partner' + + is_student = fields.Boolean(string="Is a Student", + help="Enable if the partner is a student") + is_parent = fields.Boolean(string="Is a Parent", + help="Enable if the partner is a parent") diff --git a/education_university_management/models/results_subject_line.py b/education_university_management/models/results_subject_line.py new file mode 100644 index 000000000..3fc47c178 --- /dev/null +++ b/education_university_management/models/results_subject_line.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 fields, models + + +class ResultsSubjectLine(models.Model): + """Used to manage subject details of student exam result""" + _name = 'results.subject.line' + _description = 'Results Subject Line' + + name = fields.Char(string='Name', help="Name of the result") + subject_id = fields.Many2one('university.subject', + string='Subject', + help="Subjects of the exam") + max_mark = fields.Float(string='Max Mark', help="Maximum mark of subject") + pass_mark = fields.Float(string='Pass Mark', + help="Pass mark of the subject") + mark_scored = fields.Float(string='Mark Scored', + help="Marks scored by the students in subjects") + is_pass = fields.Boolean(string='Pass/Fail', + help="Enable if the student " + "pass the subject") + result_id = fields.Many2one('exam.result', string='Result Id', + help="Relation to result model") diff --git a/education_university_management/models/timetable_period.py b/education_university_management/models/timetable_period.py new file mode 100644 index 000000000..9aa64ef97 --- /dev/null +++ b/education_university_management/models/timetable_period.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 fields, models + + +class TimetablePeriod(models.Model): + """Manages the period details """ + _name = 'timetable.period' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = 'Timetable Period' + + name = fields.Char(string="Name", required=True, help="Enter Period Name") + time_from = fields.Float(string='From', required=True, + help="Start and End time of Period.") + time_to = fields.Float(string='To', required=True, + help="Start and End time of Period.") + company_id = fields.Many2one( + 'res.company', string='Company', help="Current company", + default=lambda self: self.env.company) diff --git a/education_university_management/models/timetable_schedule_line.py b/education_university_management/models/timetable_schedule_line.py new file mode 100644 index 000000000..df8bf3ac0 --- /dev/null +++ b/education_university_management/models/timetable_schedule_line.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 TimeTableScheduleLine(models.Model): + """ Manages the schedule for subjects and faculty while + creating timetable""" + _name = 'timetable.schedule.line' + _description = 'Timetable Schedule' + _rec_name = 'period_id' + + period_id = fields.Many2one('timetable.period', + string="Period", required=True, + help="select period") + faculty_id = fields.Many2one('university.faculty', + string='Faculty', required=True, + help="Set faculty who is taking ") + time_from = fields.Float(string='From', related='period_id.time_from', + readonly=False, + help="Start and End time of Period.") + time_till = fields.Float(string='Till', related='period_id.time_to', + readonly=False, + help="Start and End time of Period.") + subject = fields.Many2one('university.subject', + string='Subjects', required=True, + help="Select the subject to schedule timetable") + week_day = fields.Selection([ + ('0', 'Monday'), + ('1', 'Tuesday'), + ('2', 'Wednesday'), + ('3', 'Thursday'), + ('4', 'Friday'), + ('5', 'Saturday'), + ('6', 'Sunday'), + ], string='Week', required=True, help="Select week for scheduling period") + timetable_id = fields.Many2one('university.timetable', + required=True, string="Timetable", + help="Relation to university.timetable") + batch_id = fields.Many2one('university.batch', string='Batch', + help="Batch") + + @api.model + def create(self, vals): + """ This method overrides the create method to automatically store + :param vals (dict): Dictionary containing the field values for the + new timetable schedule line. + :returns class:`timetable.schedule.line`The created timetable + schedule line record. + """ + res = super(TimeTableScheduleLine, self).create(vals) + res.batch_id = res.timetable_id.batch_id.id + return res diff --git a/education_university_management/models/university_academic_year.py b/education_university_management/models/university_academic_year.py new file mode 100644 index 000000000..d0eaa8a16 --- /dev/null +++ b/education_university_management/models/university_academic_year.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 fields, models + + +class UniversityAcademicYear(models.Model): + """For managing university academic year""" + _name = 'university.academic.year' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "University Academic Year" + + name = fields.Char(string="Name", help="Name of the academic year") + start_date = fields.Date(string="Start Date", required=True, + help="Enter the start date of the academic year") + end_date = fields.Date(string="End Date", required=True, + help="Enter the end date of the academic year") + is_active = fields.Boolean( + 'Active', default=True, + help="If unchecked, it will allow you to hide the Academic " + "Year without removing it.") diff --git a/education_university_management/models/university_application.py b/education_university_management/models/university_application.py new file mode 100644 index 000000000..8cc8bcece --- /dev/null +++ b/education_university_management/models/university_application.py @@ -0,0 +1,361 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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, _ +from odoo.exceptions import ValidationError + + +class UniversityApplication(models.Model): + """ For managing student applications to the courses of the university""" + _name = 'university.application' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = 'Applications for the admission' + + @api.model + def create(self, vals): + """Overriding the create method and assigning + the sequence for the record""" + if vals.get('application_no', _('New')) == _('New'): + vals['application_no'] = self.env['ir.sequence'].next_by_code( + 'university.application') or _('New') + res = super(UniversityApplication, self).create(vals) + return res + + name = fields.Char(string='Name', required=True, + help="Enter First name of Student") + middle_name = fields.Char(string='Middle Name', + help="Enter Middle name of Student") + last_name = fields.Char(string='Last Name', + help="Enter Last name of Student") + image = fields.Binary(string='Image', + attachment=True, + help="Provide the image of the Student") + academic_year_id = fields.Many2one( + 'university.academic.year', + string='Academic Year', + help="Choose Academic year for which the admission is choosing") + course_id = fields.Many2one( + 'university.course', string="Course", + required=True, + help="Enter Course to which the admission is seeking") + department_ids = fields.Many2many( + 'university.department', string="Department", + compute="_compute_department_ids", + help="Enter department to which the admission is seeking") + department_id = fields.Many2one( + 'university.department', string="Department", + required=True, + help="Enter department to which the admission is seeking") + semester_ids = fields.Many2many('university.semester', + string="Semester", + compute="_compute_semester_ids", + help="Enter semester to which the " + "admission is seeking") + semester_id = fields.Many2one('university.semester', + string="Semester", required=True, + help="Enter semester to which the admission " + "is seeking") + batch_ids = fields.Many2many('university.batch', + string="Batch", compute="_compute_batch_ids", + help="Enter batch to which the " + "admission is seeking") + batch_id = fields.Many2one('university.batch', string="Batch", + help="Enter batch to which the " + "admission is seeking") + admission_date = fields.Datetime('Admission Date', + help="Admission Taken date", + default=fields.Datetime.now, + required=True) + application_no = fields.Char(string='Application No', + help="Application number of new admission", + readonly=True, default=lambda self: _('New')) + company_id = fields.Many2one('res.company', string='Company', + help="Company of the application", + default=lambda self: self.env.user.company_id) + email = fields.Char(string="Email", required=True, + help="Enter E-mail id for contact purpose") + phone = fields.Char(string="Phone", + help="Enter Phone no. for contact purpose") + mobile = fields.Char(string="Mobile", required=True, + help="Enter Mobile num for contact purpose") + nationality_id = fields.Many2one('res.country', + string='Nationality', ondelete='restrict', + help="Select the Nationality") + mother_tongue = fields.Char(string="Mother Tongue", + help="Enter Student's Mother Tongue") + religion = fields.Char(string="Religion", + help="My Religion is ") + caste = fields.Char(string="Caste", + help="My Caste is ") + street = fields.Char(string='Street', help="Enter the street") + street2 = fields.Char(string='Street2', help="Enter the street2") + zip = fields.Char(change_default=True, string='ZIP code', + help="Enter the Zip Code") + city = fields.Char(string='City', help="Enter the City name") + state_id = fields.Many2one("res.country.state", string='State', + ondelete='restrict', + help="Select the State where you are from") + country_id = fields.Many2one('res.country', string='Country', + ondelete='restrict', + help="Select the Country") + is_same_address = fields.Boolean( + string="Permanent Address same as above", + default=True, + help="Tick the field if the Present and permanent address is same") + per_street = fields.Char(string='Street', help="Enter the street") + per_street2 = fields.Char(string='Street2', help="Enter the street2") + per_zip = fields.Char(change_default=True, string='ZIP code', + help="Enter the Zip Code") + per_city = fields.Char(string='City', help="Enter the City name") + per_state_id = fields.Many2one("res.country.state", + string='State', ondelete='restrict', + help="Select the State where you are from") + per_country_id = fields.Many2one('res.country', + string='Country', ondelete='restrict', + help="Select the Country") + date_of_birth = fields.Date(string="Date of Birth", required=True, + help="Enter your DOB") + guardian_id = fields.Many2one('res.partner', string="Guardian", + domain=[('is_parent', '=', True)], + required=True, + help="Tell us who will take care of you") + description = fields.Text(string="Note", + help="Description about the application") + father_name = fields.Char(string="Father", help="My father is") + mother_name = fields.Char(string="Mother", help="My mother's name is") + active = fields.Boolean(string='Active', default=True, + help="Is the application is active or not") + document_count = fields.Integer(compute='_compute_document_count', + string='# Documents', + help="Number of documents of application") + verified_by_id = fields.Many2one('res.users', + string='Verified by', + help="The Document is verified by") + reject_reason = fields.Many2one('reject.reason', + string='Reject Reason', + help="Application is rejected because") + gender = fields.Selection( + [('male', 'Male'), ('female', 'Female'), ('other', 'Other')], + string='Gender', required=True, default='male', + track_visibility='onchange', + help="Your Gender is") + blood_group = fields.Selection( + [('a+', 'A+'), ('a-', 'A-'), ('b+', 'B+'), ('o+', 'O+'), + ('o-', 'O-'), ('ab-', 'AB-'), ('ab+', 'AB+')], string='Blood Group', + required=True, default='a+', track_visibility='onchange', + help="Your Blood Group is") + state = fields.Selection([('draft', 'Draft'), + ('verification', 'Verify'), + ('approve', 'Approve'), ('reject', 'Rejected'), + ('done', 'Done')], string='State', required=True, + default='draft', track_visibility='onchange', + help="Status of the application") + prev_institute = fields.Char('Previous Institute', + help="Previously studied institution", + states={'done': [('readonly', True)]}) + prev_course = fields.Char('Previous Course', + help="Previously studied course", + states={'done': [('readonly', True)]}) + prev_result = fields.Char('Previous Result', + help="Previously studied institution", + states={'done': [('readonly', True)]}) + + def _compute_document_count(self): + """Return the count of the documents provided""" + for rec in self: + rec.document_count = self.env['university.document'].search_count( + [('application_ref_id', '=', rec.id)]) + + def action_document_view(self): + """ smart button action of viewing list of documents of application + :return dict: the list of documents view + """ + return { + 'name': _('Documents'), + 'domain': [('application_ref_id', '=', self.id)], + 'res_model': 'university.document', + 'type': 'ir.actions.act_window', + 'view_id': False, + 'view_mode': 'tree,form', + 'context': {'default_application_ref_id': self.id} + } + + def action_send_verification(self): + """Button action for sending the application for the verification""" + for rec in self: + if not self.env['university.document'].search( + [('application_ref_id', '=', rec.id)]): + raise ValidationError(_('No Documents provided')) + rec.write({ + 'state': 'verification' + }) + + def action_verify_application(self): + """ This method checks the status of documents related to the student + application. If no documents are provided or if the provided + documents are not in the 'done' state, it raises a validation error + Otherwise, it updates the verification status of the application + and approves it. + + :raises ValidationError: If all documents are not verified or no + documents are provided. + """ + for rec in self: + doc_status = self.env['university.document'].search( + [('application_ref_id', '=', rec.id)]).mapped('state') + if doc_status: + if all(state in 'done' for state in doc_status): + rec.write({ + 'verified_by_id': self.env.uid, + 'state': 'approve' + }) + else: + raise ValidationError( + _('All Documents are not Verified Yet, ' + 'Please complete the verification')) + else: + raise ValidationError(_('No Documents provided')) + + def action_reject(self): + """This method updates the state of the student application to 'reject', + indicating that the application has been rejected for admission. + """ + for rec in self: + rec.write({ + 'state': 'reject' + }) + + def action_create_student(self): + """ This method creates a new student record using the data from the + application.It populates the student record with the relevant + information. It also assigns a user login for the student. + + :returns dict: A dictionary containing the information required + to open the student form view. + """ + for rec in self: + values = { + 'name': rec.name, + 'last_name': rec.last_name, + 'middle_name': rec.middle_name, + 'application_id': rec.id, + 'father_name': rec.father_name, + 'mother_name': rec.mother_name, + 'guardian_id': rec.guardian_id.id, + 'street': rec.street, + 'street2': rec.street2, + 'city': rec.city, + 'state_id': rec.state_id.id, + 'country_id': rec.country_id.id, + 'zip': rec.zip, + 'is_same_address': rec.is_same_address, + 'per_street': rec.per_street, + 'per_street2': rec.per_street2, + 'per_city': rec.per_city, + 'per_state_id': rec.per_state_id.id, + 'per_country_id': rec.per_country_id.id, + 'per_zip': rec.per_zip, + 'gender': rec.gender, + 'date_of_birth': rec.date_of_birth, + 'blood_group': rec.blood_group, + 'nationality_id': rec.nationality_id.id, + 'email': rec.email, + 'mobile': rec.mobile, + 'phone': rec.phone, + 'image_1920': rec.image, + 'is_student': True, + 'religion': rec.religion, + 'caste': rec.caste, + 'mother_tongue': rec.mother_tongue, + 'semester_id': rec.semester_id.id, + 'academic_year_id': rec.academic_year_id.id, + 'company_id': rec.company_id.id, + 'batch_id': rec.batch_id.id, + } + if not rec.is_same_address: + pass + else: + values.update({ + 'per_street': rec.street, + 'per_street2': rec.street2, + 'per_city': rec.city, + 'per_state_id': rec.state_id.id, + 'per_country_id': rec.country_id.id, + 'per_zip': rec.zip, + }) + student = self.env['university.student'].create(values) + student.user_id = self.env['res.users'].create({ + 'name': student.name, + 'login': student.email, + 'partner_id': student.partner_id.id, + 'groups_id': [(6, 0, [self.env.ref('base.group_portal').id])] + }) + rec.write({ + 'state': 'done' + }) + return { + 'name': _('Student'), + 'view_mode': 'form', + 'res_model': 'university.student', + 'type': 'ir.actions.act_window', + 'res_id': student.id, + 'context': self.env.context + } + + @api.depends('course_id') + def _compute_department_ids(self): + """ To find the departments in the selected course and assign them + to department_ids field for setting domain for department_id field + """ + for rec in self: + rec.department_ids = self.env['university.department'].search( + [('course_id', '=', + self.course_id.id)]).ids if rec.course_id else False + + @api.depends('department_id') + def _compute_semester_ids(self): + """ To find the semester in the selected department and assign them + to semester_ids field for setting domain for semester_id field + """ + for rec in self: + rec.semester_ids = self.env['university.semester'].search( + [('department_id', '=', + self.department_id.id)]).ids if rec.department_id else False + + @api.depends('semester_id') + def _compute_batch_ids(self): + """ To find the batch in the selected semester and assign them + to batch_ids field. + """ + for rec in self: + rec.batch_ids = self.env['university.batch'].search( + [('semester_id', '=', + self.semester_id.id)]).ids if rec.semester_id else False + + @api.onchange('date_of_birth') + def _onchange_date_of_birth(self): + """ It checks if the provided date of birth makes the person under + 18 years old. + :raises ValidationError: If the person is under 18. + """ + if self.date_of_birth: + if (fields.date.today().year - self.date_of_birth.year) < 18: + raise ValidationError(_('Please provide valid date of birth')) diff --git a/education_university_management/models/university_attendance.py b/education_university_management/models/university_attendance.py new file mode 100644 index 000000000..d3769a131 --- /dev/null +++ b/education_university_management/models/university_attendance.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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, _ +from odoo.exceptions import UserError, ValidationError + + +class UniversityAttendance(models.Model): + """For managing student daily attendance details""" + _name = 'university.attendance' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "University Student attendance" + + name = fields.Char(string="Name", default="New", + help="Name of the attendance") + batch_id = fields.Many2one('university.batch', string="Batch", + required=True, + help="Select batch for the attendance") + faculty_id = fields.Many2one(related='batch_id.faculty_id', + string="Faculty", + help="Faculty in charge for the batch") + date = fields.Date(string="Date", default=fields.Date.today, required=True, + help="Select date of attendance") + attendance_line_ids = fields.One2many('university.attendance.line', + 'attendance_id', + string='Attendance Line', + help="Students attendance " + "list/attendance line") + state = fields.Selection([('draft', 'Draft'), ('done', 'Done')], + default='draft', help="Status of attendance") + is_all_marked_morning = fields.Boolean( + string='All students are present in the morning', + help="Is all student present in the morning") + is_all_marked_afternoon = fields.Boolean( + string='All students are present in the afternoon', + help="Is all student present in the afternoon") + is_attendance_created = fields.Boolean(string='Attendance Created', + help="Is Attendance created or not") + + @api.onchange('batch_id') + def _onchange_batch_id(self): + """ Method to clear the attendance line if the batch is changed """ + if self.batch_id: + self.is_attendance_created = False + self.attendance_line_ids = False + + def action_create_attendance_line(self): + """Action to create attendance line with students in the batch""" + if self.search_count( + [('batch_id', '=', self.batch_id.id), ('date', '=', self.date), + ('state', '=', 'done')]) == 1: + raise ValidationError( + _('Attendance for this batch on this date already exists.')) + self.name = str(self.date) + if len(self.batch_id.batch_student_ids) < 1: + raise UserError(_('There are no students in this Batch')) + for student in self.batch_id.batch_student_ids: + self.env['university.attendance.line'].create( + {'name': self.name, + 'attendance_id': self.id, + 'student_id': student.id, + 'batch_id': self.batch_id.id, + 'date': self.date, }) + self.is_attendance_created = True + + def action_mark_all_present_morning(self): + """Action to mark all marked presents of students in the morning""" + for records in self.attendance_line_ids: + records.is_present_morning = True + self.is_all_marked_morning = True + + def action_un_mark_all_present_morning(self): + """Action to unmark all marked presents of students in the morning""" + for records in self.attendance_line_ids: + records.is_present_morning = False + self.is_all_marked_morning = False + + def action_mark_all_present_afternoon(self): + """Action to mark all marked presents of students in the afternoon""" + for records in self.attendance_line_ids: + records.is_present_afternoon = True + self.is_all_marked_afternoon = True + + def action_un_mark_all_present_afternoon(self): + """Action to unmark all marked presents of students in the afternoon""" + for records in self.attendance_line_ids: + records.is_present_afternoon = False + self.is_all_marked_afternoon = False + + def action_attendance_done(self): + """To compute absent of student is half/full day and + make the attendance to done stage""" + for records in self.attendance_line_ids: + if not records.is_present_morning and \ + not records.is_present_afternoon: + records.full_day_absent = 1 + elif not records.is_present_morning: + records.half_day_absent = 1 + elif not records.is_present_afternoon: + records.half_day_absent = 1 + self.state = 'done' diff --git a/education_university_management/models/university_attendance_line.py b/education_university_management/models/university_attendance_line.py new file mode 100644 index 000000000..4ed46c5fb --- /dev/null +++ b/education_university_management/models/university_attendance_line.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 fields, models + + +class UniversityAttendanceLine(models.Model): + """For recording if the student is present during the day or not.""" + _name = 'university.attendance.line' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = 'Attendance Lines' + + name = fields.Char(string='Name', help="Name of the attendance") + attendance_id = fields.Many2one('university.attendance', + string='Attendance Id', + help="Relation field to attendance module") + student_id = fields.Many2one('university.student', + string='Student', + help="Students of the batch") + is_present_morning = fields.Boolean(string='Morning', + help="Is student is present in the " + "morning") + is_present_afternoon = fields.Boolean(string='After Noon', + help="Is student is present in " + "the afternoon") + full_day_absent = fields.Integer(string='Full Day', + help="Is student full day absent or not ") + half_day_absent = fields.Integer(string='Half Day', + help="Is student half day absent or not ") + batch_id = fields.Many2one('university.batch', string="Batch", + required=True, + help="Select batch for the attendance") + date = fields.Date(string='Date', required=True, help="Attendance date") diff --git a/education_university_management/models/university_batch.py b/education_university_management/models/university_batch.py new file mode 100644 index 000000000..0b612d2fc --- /dev/null +++ b/education_university_management/models/university_batch.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 UniversityBatch(models.Model): + """For managing batches of every department in the university""" + _name = 'university.batch' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "University Batches" + + @api.model + def create(self, vals): + """Return the name as a str of semester + academic year""" + semester_id = self.env['university.semester'].browse( + vals['semester_id']) + academic_year_id = self.env['university.academic.year'].browse( + vals['academic_year_id']) + name = str(semester_id.name + ' - ' + academic_year_id.name) + vals['name'] = name + return super(UniversityBatch, self).create(vals) + + name = fields.Char(string="Name", help="Name of the Batch", readonly=True) + semester_id = fields.Many2one('university.semester', + string="Semester", required=True, + help="Select the semester") + department_id = fields.Many2one(related='semester_id.department_id', + string="Department", + help="In which department this " + "batch belongs to") + academic_year_id = fields.Many2one('university.academic.year', + string="Academic Year", required=True, + help="Select the academic year") + batch_strength = fields.Integer(string='Batch Strength', + help="Total strength of the batch") + faculty_id = fields.Many2one('university.faculty', + string='Faculty', help="Batch tutor/Faculty") + batch_student_ids = fields.One2many('university.student', + 'batch_id', + string="Students", + help="Students of this Batch") diff --git a/education_university_management/models/university_course.py b/education_university_management/models/university_course.py new file mode 100644 index 000000000..67d995b43 --- /dev/null +++ b/education_university_management/models/university_course.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 fields, models + + +class UniversityCourse(models.Model): + """Used to managing the courses of university""" + _name = 'university.course' + _description = "University Courses" + + name = fields.Char(string="Name", required=True, help="Name of the course") + category = fields.Selection( + [('ug', 'Under Graduation'), ('pg', 'Post Graduation'), + ('diploma', 'Diploma')], string="Course Category", required=True, + help="In which category the course belong") + no_semester = fields.Integer(string="No.of Semester", + help="No.of semesters in each course") diff --git a/education_university_management/models/university_department.py b/education_university_management/models/university_department.py new file mode 100644 index 000000000..db885e5c0 --- /dev/null +++ b/education_university_management/models/university_department.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 UniversityDepartment(models.Model): + """Used to manage department of every courses""" + _name = 'university.department' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "University Department" + + name = fields.Char(string="Name", help="Name of the course") + code = fields.Char(string="Code", help="Code of the course", required=True) + course_id = fields.Many2one('university.course', + string="Course", required=True, + help="In what course the department belongs") + semester_ids = fields.One2many('university.semester', + 'department_id', + string="Semester", readonly=True, + help="List of semesters under every course") + + def get_departments(self,course): + return self.search([('course_id', '=',course)]) \ No newline at end of file diff --git a/education_university_management/models/university_document.py b/education_university_management/models/university_document.py new file mode 100644 index 000000000..c83dcc28b --- /dev/null +++ b/education_university_management/models/university_document.py @@ -0,0 +1,97 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 UniversityDocuments(models.Model): + """For managing the student document verification details""" + _name = 'university.document' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "Students Documents" + + name = fields.Char(string="Reference No.", copy=False, + help="Sequence of the document", + default=lambda self: _('New')) + document_type_id = fields.Many2one('university.document.type', + string="Document Type", required=True, + help="Choose the type of document") + application_ref_id = fields.Many2one('university.application', + string="Application Ref.", + help="Application reference of " + "document") + description = fields.Text(string='Description', + help="Enter a description about the document") + verified_date = fields.Date(string="Verified Date", + help="Date at the verification is done") + verified_by_id = fields.Many2one('res.users', + string='Verified by', + help="Document Verified user") + responsible_verified_id = fields.Many2one('hr.employee', + string="Responsible", + help="Responsible person for " + "verification") + attachment_ids = fields.Many2many( + 'ir.attachment', 'university_attach_rel', + 'doc_id', 'doc_attach_id', + string="Attachment", required=True, + help='You can attach the copy of your document', + copy=False) + state = fields.Selection( + [('draft', 'Draft'), ('correction', 'Correction'), + ('done', 'Done')], string='State', required=True, default='draft', + help="Status of document", track_visibility='onchange') + + @api.model + def create(self, vals): + """ This method overrides the create method to assign a sequence to + newly created records. + :param vals (dict): Dictionary containing the field values + for the new university document record. + :returns class:`~university.documents`: The created university + document record. + """ + if vals.get('name', _('New')) == _('New'): + vals['name'] = self.env['ir.sequence'].next_by_code( + 'university.document') or _('New') + res = super(UniversityDocuments, self).create(vals) + return res + + def action_verify_document(self): + """ This method updates the state of the university document to 'done' + if the documents are deemed perfect. + """ + for rec in self: + rec.write({ + 'verified_by_id': self.env.uid, + 'verified_date': fields.Datetime.now().strftime("%Y-%m-%d"), + 'state': 'done' + }) + + def action_need_correction(self): + """ This method updates the state of the university document to + 'correction' if the documents are deemed not perfect and + require correction. + """ + for rec in self: + rec.write({ + 'state': 'correction' + }) diff --git a/education_university_management/models/university_document_type.py b/education_university_management/models/university_document_type.py new file mode 100644 index 000000000..28e0a044a --- /dev/null +++ b/education_university_management/models/university_document_type.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 fields, models + + +class UniversityDocumentType(models.Model): + """For managing document types in the document""" + _name = 'university.document.type' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "University Document Type" + + name = fields.Char(string="Name", help="Name of the document type") + description = fields.Char(string="Description", + help="Description about type") diff --git a/education_university_management/models/university_exam.py b/education_university_management/models/university_exam.py new file mode 100644 index 000000000..a431b71c9 --- /dev/null +++ b/education_university_management/models/university_exam.py @@ -0,0 +1,92 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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, _ +from odoo.exceptions import UserError, ValidationError + + +class UniversityExam(models.Model): + """Used to manage student exams of every semester""" + _name = 'university.exam' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "University Student Exam management" + + name = fields.Char(string='Name', default='New', help="Name of the exam") + batch_id = fields.Many2one('university.batch', string='Batch', + help="Which batch's exam is") + exam_type_id = fields.Many2one('university.exam.type', + string='Type', help="Type of exam", + required=True) + start_date = fields.Date(string='Start Date', required=True, + help="Enter start date of the exam") + end_date = fields.Date(string='End Date', required=True, + help="Enter end date of the exam") + subject_line_ids = fields.One2many('exam.subject.line', + 'exam_id', string='Subjects', + help="Subjects of the exam") + state = fields.Selection( + [('draft', 'Draft'), + ('ongoing', 'On Going'), + ('close', 'Closed'), + ('cancel', 'Canceled')], + default='draft', help="Status of the exam") + academic_year_id = fields.Many2one(related='batch_id.academic_year_id', + string='Academic Year', + help="Academic year of batch") + company_id = fields.Many2one( + 'res.company', string='Company', help="Company of the exam", + default=lambda self: self.env.company) + + @api.constrains('start_date', 'end_date') + def check_dates(self): + """ This constraint method validates that the start date of the exam is + earlier than the end date. + :raises ValidationError: If the start date is greater than the + end date + """ + for rec in self: + if rec.start_date > rec.end_date: + raise ValidationError( + _("Start date must be Anterior to end date")) + + def action_close_exam(self): + """ This method sets the state of the exam to 'close', + indicating that the exam has been closed. + """ + self.state = 'close' + + def action_cancel_exam(self): + """ This method sets the state of the exam to 'cancel', + indicating that the exam has been canceled. + """ + self.state = 'cancel' + + def action_confirm_exam(self): + """ This method confirms the exam and checks if at least + one subject is added to the exam. + :raises UserError: If no subjects are added to the exam. + """ + if len(self.subject_line_ids) < 1: + raise UserError(_('Please Add Subjects')) + self.name = str(self.exam_type_id.name) + '/' + str(self.start_date)[ + 0:10] + ' (' + str( + self.batch_id.name) + ')' + self.state = 'ongoing' diff --git a/education_university_management/models/university_exam_type.py b/education_university_management/models/university_exam_type.py new file mode 100644 index 000000000..e754ce9be --- /dev/null +++ b/education_university_management/models/university_exam_type.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 fields, models + + +class UniversityExamType(models.Model): + """For managing type of exams such as internal or semester""" + _name = 'university.exam.type' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = 'University Exam Type' + + name = fields.Char(string='Name', required=True, + help="Name of the exam type") + exam_type = fields.Selection( + [('internal', 'Internal'), ('sem', 'Semester')], + string='Exam Type', default='internal', + help="Select exam type for exams") + company_id = fields.Many2one( + 'res.company', string='Company', help="Company of the " + "exam type", + default=lambda self: self.env.company) diff --git a/education_university_management/models/university_faculty.py b/education_university_management/models/university_faculty.py new file mode 100644 index 000000000..609326cd1 --- /dev/null +++ b/education_university_management/models/university_faculty.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 fields, models + + +class UniversityFaculty(models.Model): + """For managing faculties of university""" + _name = 'university.faculty' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "University Faculty records" + + name = fields.Char(string='Name', required=True, + help="Enter the first name") + last_name = fields.Char(string='Last Name', help="Enter the last name") + image = fields.Binary(string="Image", attachment=True, + help="Image of the faculty") + date_of_birth = fields.Date(string="Date of Birth", required=True, + help="Enter the DOB") + email = fields.Char(string="Email", required=True, + help="Enter the Email for contact purpose") + phone = fields.Char(string="Phone", + help="Enter the Phone for contact purpose") + mobile = fields.Char(string="Mobile", required=True, + help="Enter the Mobile for contact purpose") + guardian_id = fields.Char(string="Guardian", help="Your guardian is ") + father_name = fields.Char(string="Father", help="Your Father name is ") + mother_name = fields.Char(string="Mother", help="Your Mother name is ") + degree_id = fields.Many2one('hr.recruitment.degree', + string="Degree", + Help="Select your Highest degree") + subject_line_ids = fields.Many2many('university.subject', + string='Subject Lines', + help="Subjects of Faculty") + employee_id = fields.Many2one('hr.employee', + string="Related Employee", + help="Related employee of faculty") + gender = fields.Selection( + [('male', 'Male'), ('female', 'Female'), ('other', 'Other')], + string='Gender', required=True, default='male', + help="Gender of the faculty", + track_visibility='onchange') + blood_group = fields.Selection( + [('a+', 'A+'), ('a-', 'A-'), ('b+', 'B+'), ('o+', 'O+'), + ('o-', 'O-'), ('ab-', 'AB-'), ('ab+', 'AB+')], + string='Blood Group', required=True, default='a+', + help="Blood group of faculty", track_visibility='onchange') + + def action_create_employee(self): + """Creating the employee for the faculty""" + for rec in self: + emp_id = self.env['hr.employee'].create({ + 'name': rec.name + ' ' + rec.last_name, + 'gender': rec.gender, + 'birthday': rec.date_of_birth, + 'image_1920': rec.image, + 'work_phone': rec.phone, + 'work_email': rec.email, + }) + rec.employee_id = emp_id.id diff --git a/education_university_management/models/university_semester.py b/education_university_management/models/university_semester.py new file mode 100644 index 000000000..7a99d5200 --- /dev/null +++ b/education_university_management/models/university_semester.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 UniversitySemester(models.Model): + """Used to manage the semester of department""" + _name = 'university.semester' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "University Semester" + + @api.model + def create(self, vals): + """ This method overrides the create method to generate the name for + the semester based on the department code and semester number. + + :param vals (dict): Dictionary containing the field values for the + new university semester record. + :returns class:`~university.semester`: The created university + semester record. + """ + department_id = self.env['university.department'].browse( + vals['department_id']) + name = str(department_id.code) + '/Sem ' + str(vals['semester_no']) + vals['name'] = name + return super(UniversitySemester, self).create(vals) + + name = fields.Char(string="Name", help="Name of the semester", + readonly=True) + semester_no = fields.Integer(string="Semester", help="Semester number", + required=True) + department_id = fields.Many2one('university.department', + string="Department", + required=True, + help="In which department the semester " + "belongs to") + syllabus_ids = fields.One2many('university.syllabus', + 'semester_id', + readonly=1, help="Syllabus of semester", + string="Syllabus") diff --git a/education_university_management/models/university_student.py b/education_university_management/models/university_student.py new file mode 100644 index 000000000..3955693ba --- /dev/null +++ b/education_university_management/models/university_student.py @@ -0,0 +1,148 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 UniversityStudent(models.Model): + """To keep records of university student details""" + _name = 'university.student' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _inherits = {'res.partner': 'partner_id'} + _description = 'University student records' + + @api.model + def create(self, vals): + """ This method overrides the create method to assign a sequence number + to the newly created record. + :param vals (dict): Dictionary containing the field values for the + new university student record. + :returns class: university.student The created university student + record. + """ + vals['admission_no'] = self.env['ir.sequence'].next_by_code( + 'university.student') + res = super(UniversityStudent, self).create(vals) + return res + + partner_id = fields.Many2one( + 'res.partner', string='Partner', help="Student Partner", + required=True, ondelete="cascade") + middle_name = fields.Char(string='Middle Name', + help="Middle Name of the student") + last_name = fields.Char(string='Last Name', help="Last name of student") + application_no = fields.Char(string="Application No", + help="Application number of the student") + date_of_birth = fields.Date(string="Date of Birth", requird=True, + help="Date of Birth details") + guardian_id = fields.Many2one('res.partner', string="Guardian", + help="Student guardian details", + domain=[('is_parent', '=', True)]) + father_name = fields.Char(string="Father", help="Student father details") + mother_name = fields.Char(string="Mother", help="Student mother details") + semester_id = fields.Many2one('university.semester', + string="Semester", + help="Which semester of student is") + department_id = fields.Many2one(related='semester_id.department_id', + help="Which department in semester", + string="Department") + course_id = fields.Many2one(related='department_id.course_id', + help="Which course in the department", + string="Course") + admission_no = fields.Char(string="Admission Number", readonly=True, + help="Admission no. of the student ") + gender = fields.Selection([('male', 'Male'), + ('female', 'Female'), + ('other', 'Other')], + help="Student gender details", + string='Gender', required=True, default='male', + track_visibility='onchange') + blood_group = fields.Selection([('a+', 'A+'), + ('a-', 'A-'), + ('b+', 'B+'), + ('o+', 'O+'), + ('o-', 'O-'), + ('ab-', 'AB-'), + ('ab+', 'AB+')], + string='Blood Group', required=True, + help="Student blood group details", + default='a+', + track_visibility='onchange') + company_id = fields.Many2one('res.company', string='Company', + help="Company") + per_street = fields.Char(string="Street", help="Street Address") + per_street2 = fields.Char(string="Street2", help="Street2 address") + per_zip = fields.Char(change_default=True, string="Zip", + help="Zip/Pincode details") + per_city = fields.Char(string="City", help="Student living city") + per_state_id = fields.Many2one("res.country.state", + string='State',help="State", + ondelete='restrict') + per_country_id = fields.Many2one('res.country', + string='Country', + help="Nationality of student", + ondelete='restrict') + mother_tongue = fields.Char(string="Mother Tongue", + help="Student mother tongue") + caste = fields.Char(string="Caste", + help="Student caste details") + religion = fields.Char(string="Religion", + help="Student religion details") + is_same_address = fields.Boolean(string="Is same Address?", + help="Enable if student have single " + "address") + nationality_id = fields.Many2one('res.country', + string='Nationality', + help="Nationality of student", + ondelete='restrict') + application_id = fields.Many2one('university.application', + help="Application no of student", + string="Application No") + user_id = fields.Many2one('res.users', string="User", + readonly=True, + help="Related User of the student") + batch_id = fields.Many2one('university.batch', string="Batch", + help="Relation to batches of university") + academic_year_id = fields.Many2one('university.academic.year', + string="Academic Year", + help="Academic year of the student") + + def action_student_documents(self): + """ Open the documents submitted by the student along with the admission + application. This method retrieves the documents associated with + the admission application linked to the current student record. + :returns dict: A dictionary defining the action to open the + 'university.document' records. + """ + self.ensure_one() + if self.application_id.id: + documents_list = self.env['university.document'].search( + [('application_ref_id', '=', self.application_id.id)]).mapped( + 'id') + return { + 'domain': [('id', 'in', documents_list)], + 'name': _('Documents'), + 'view_mode': 'tree,form', + 'res_model': 'university.document', + 'view_id': False, + 'context': {'application_ref_id': self.application_id.id}, + 'type': 'ir.actions.act_window' + } diff --git a/education_university_management/models/university_subject.py b/education_university_management/models/university_subject.py new file mode 100644 index 000000000..e1e1f1966 --- /dev/null +++ b/education_university_management/models/university_subject.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 fields, models + + +class UniversitySubject(models.Model): + """For managing subjects of every courses""" + _name = 'university.subject' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "University Subjects" + + name = fields.Char(string="Subject", help="Name of the subject") + is_language = fields.Boolean(string="Language", + help="Tick if this subject is a language") + is_lab = fields.Boolean(string="Lab", help="Tick if this subject is a Lab") + code = fields.Char(string="Code", help="Enter the Subject Code") + type = fields.Selection( + [('compulsory', 'Compulsory'), ('elective', 'Elective')], + string='Type', default="compulsory", + help="Choose the type of the subject") + weightage = fields.Float(string='Weightage', default=1.0, + help="Enter the weightage for this subject") + description = fields.Text(string='Description', + help="Description about the subject") diff --git a/education_university_management/models/university_syllabus.py b/education_university_management/models/university_syllabus.py new file mode 100644 index 000000000..dfab98bf3 --- /dev/null +++ b/education_university_management/models/university_syllabus.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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 UniversitySyllabus(models.Model): + """Manages the syllabus of department""" + _name = 'university.syllabus' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = "University Syllabus" + + @api.model + def create(self, vals): + """ This method overrides the create method to generate the name for the + syllabus based on the department and subject. + :param vals (dict): Dictionary containing the field values for the + new university syllabus record. + :returns class:`university.syllabus` The created university + syllabus record. + """ + """Return the name as a str of course code + subject code""" + semester_id = self.env['university.semester'].browse( + vals['semester_id']) + subject_id = self.env['university.subject'].browse( + vals['subject_id']) + name = str(semester_id.name) + '/' + str( + subject_id.code) + '-Syllabus' + vals['name'] = name + return super(UniversitySyllabus, self).create(vals) + + name = fields.Char(string="Name", help="Syllabus name", readonly=True) + subject_id = fields.Many2one('university.subject', + required=True, string="Subject", + help="Select subject for syllabus") + total_hrs = fields.Float(string="Total Hrs", + help="Time for completing subjects") + description = fields.Text(string='Module Details', + help="Description about modules") + subject_code = fields.Char(related='subject_id.code', string="Code", + help="Subject code of selected subject") + subject_weightage = fields.Float(related='subject_id.weightage', + help="Points of the subject") + semester_id = fields.Many2one('university.semester', + string="Semester", required=True, + help="Select semester for syllabus") + department_id = fields.Many2one(related='semester_id.department_id', + string="Department", + help="Select department for syllabus") diff --git a/education_university_management/models/university_timetable.py b/education_university_management/models/university_timetable.py new file mode 100644 index 000000000..423f74c5d --- /dev/null +++ b/education_university_management/models/university_timetable.py @@ -0,0 +1,86 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Raneesha M K (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, _ +from odoo.exceptions import ValidationError + + +class UniversityTimeTable(models.Model): + """Manages the timetable of every batch""" + _name = 'university.timetable' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = 'Timetable' + + name = fields.Char(string="Name", compute="_compute_name", + help="Name of the timetable") + batch_id = fields.Many2one('university.batch', string='Batch', + help="Batch of the timetable", + required=True) + academic_year_id = fields.Many2one(related="batch_id.academic_year_id", + help="Batch academic year", + string='Academic Year') + mon_timetable_ids = fields.One2many('timetable.schedule.line', + 'timetable_id', + help="Scheduled line of Monday", + domain=[('week_day', '=', '0')]) + tue_timetable_ids = fields.One2many('timetable.schedule.line', + 'timetable_id', + help="Scheduled line of Tuesday", + domain=[('week_day', '=', '1')]) + wed_timetable_ids = fields.One2many('timetable.schedule.line', + 'timetable_id', + help="Scheduled line of Wednesday", + domain=[('week_day', '=', '2')]) + thur_timetable_ids = fields.One2many('timetable.schedule.line', + 'timetable_id', + help="Scheduled line of Thursday", + domain=[('week_day', '=', '3')]) + fri_timetable_ids = fields.One2many('timetable.schedule.line', + 'timetable_id', + help="Scheduled line of Friday", + domain=[('week_day', '=', '4')]) + sat_timetable_ids = fields.One2many('timetable.schedule.line', + 'timetable_id', + help="Scheduled line of Saturday", + domain=[('week_day', '=', '5')]) + company_id = fields.Many2one( + 'res.company', string='Company', help="Company", + default=lambda self: self.env.company) + + def _compute_name(self): + """generate name for the timetable records""" + for rec in self: + rec.name = False + if rec.batch_id and rec.academic_year_id: + rec.name = "/".join([rec.batch_id.name, "Schedule"]) + + @api.constrains('batch_id') + def _check_batch(self): + """ This method ensures that only one timetable can be scheduled for a + specific Batch. + + :raises: ValidationError if more than one timetable is already + scheduled for the Batch. + """ + batches = self.search_count([('batch_id', '=', self.batch_id.id)]) + if batches > 1: + raise ValidationError(_('Timetable is already scheduled for ' + 'this Batch')) diff --git a/education_university_management/security/education_university_management_groups.xml b/education_university_management/security/education_university_management_groups.xml new file mode 100644 index 000000000..a0157f542 --- /dev/null +++ b/education_university_management/security/education_university_management_groups.xml @@ -0,0 +1,30 @@ + + + + + University + Helps you to manage your institution + 5 + + + + Staff + + + + + + Head Of Department + + + + + + Principal + + + + + diff --git a/education_university_management/security/ir.model.access.csv b/education_university_management/security/ir.model.access.csv new file mode 100644 index 000000000..daab893f0 --- /dev/null +++ b/education_university_management/security/ir.model.access.csv @@ -0,0 +1,70 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_application_reject,access.application.reject.py,model_application_reject,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_course,access.university.course,model_university_course,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_department,access.university.department,model_university_department,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_subject,access.university.subject,model_university_subject,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_semester,access.university.semester,model_university_semester,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_syllabus,access.university.syllabus,model_university_syllabus,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_academic_year,access.university.academic.year,model_university_academic_year,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_batch,access.university.batch,model_university_batch,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_faculty,access.university.faculty,model_university_faculty,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_application,access.university.application,model_university_application,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_document_type,access.university.document.type,model_university_document_type,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_document,access.university.document,model_university_document,education_university_management.education_university_management_group_hod,1,1,1,1 +access_reject_reason,access.reject.reason,model_reject_reason,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_student,access.university.student,model_university_student,education_university_management.education_university_management_group_hod,1,1,1,1 +access_fee_category,access.fee.category,model_fee_category,education_university_management.education_university_management_group_hod,1,1,1,1 +access_fee_type,access.fee.type,model_fee_type,education_university_management.education_university_management_group_hod,1,1,1,1 +access_fee_structure,access.fee.structure,model_fee_structure,education_university_management.education_university_management_group_hod,1,1,1,1 +access_fee_structure_line,access.fee.structure.line,model_fee_structure_line,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_attendance,access.university.attendance,model_university_attendance,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_attendance_line,access.university.attendance.line,model_university_attendance_line,education_university_management.education_university_management_group_hod,1,1,1,1 +access_timetable_period,access.timetable.period,model_timetable_period,education_university_management.education_university_management_group_hod,1,1,1,1 +access_timetable_schedule_line,access.timetable.schedule.line,model_timetable_schedule_line,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_timetable,access.university.timetable,model_university_timetable,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_exam_type,access.university.exam.type,model_university_exam_type,education_university_management.education_university_management_group_hod,1,1,1,1 +access_university_exam,access.university.exam,model_university_exam,education_university_management.education_university_management_group_hod,1,1,1,1 +access_exam_subject_line,access.exam.subject.line,model_exam_subject_line,education_university_management.education_university_management_group_hod,1,1,1,1 +access_exam_valuation,access.exam.valuation,model_exam_valuation,education_university_management.education_university_management_group_hod,1,1,1,1 +access_exam_valuation_line,access.exam.valuation.line,model_exam_valuation_line,education_university_management.education_university_management_group_hod,1,1,1,1 +access_exam_result,access.exam.result,model_exam_result,education_university_management.education_university_management_group_hod,1,1,1,1 +access_results_subject_line,access.results.subject.line,model_results_subject_line,education_university_management.education_university_management_group_hod,1,1,1,1 +access_application_reject_faculty,access.application.reject.py,model_application_reject,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_course_faculty,access.university.course,model_university_course,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_department_faculty,access.university.department,model_university_department,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_subject_faculty,access.university.subject,model_university_subject,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_semester_faculty,access.university.semester,model_university_semester,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_syllabus_faculty,access.university.syllabus,model_university_syllabus,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_academic_year_faculty,access.university.academic.year,model_university_academic_year,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_batch_faculty,access.university.batch,model_university_batch,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_faculty_faculty,access.university.faculty,model_university_faculty,education_university_management.education_university_management_group_faculty,1,1,1,1 +access_university_application_faculty,access.university.application,model_university_application,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_document_type_faculty,access.university.document.type,model_university_document_type,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_document_faculty,access.university.document,model_university_document,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_reject_reason_faculty,access.reject.reason,model_reject_reason,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_student_faculty,access.university.student,model_university_student,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_fee_category_faculty,access.fee.category,model_fee_category,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_fee_type_faculty,access.fee.type,model_fee_type,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_fee_structure_faculty,access.fee.structure,model_fee_structure,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_fee_structure_line_faculty,access.fee.structure.line,model_fee_structure_line,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_attendance_faculty,access.university.attendance,model_university_attendance,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_attendance_line_faculty,access.university.attendance.line,model_university_attendance_line,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_timetable_period_faculty,access.timetable.period,model_timetable_period,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_timetable_faculty,access.university.timetable,model_university_timetable,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_timetable_schedule_line_faculty,access.timetable.schedule.line,model_timetable_schedule_line,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_exam_type_faculty,access.university.exam.type,model_university_exam_type,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_university_exam_faculty,access.university.exam,model_university_exam,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_exam_subject_line_faculty,access.exam.subject.line,model_exam_subject_line,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_exam_valuation_faculty,access.exam.valuation,model_exam_valuation,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_exam_valuation_line_faculty,access.exam.valuation.line,model_exam_valuation_line,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_exam_result_faculty,access.exam.result,model_exam_result,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_results_subject_line_faculty,access.results.subject.line,model_results_subject_line,education_university_management.education_university_management_group_faculty,1,1,1,0 +access_ir_sequence_public,access.ir.sequence.public,base.model_ir_sequence,base.group_public,1,1,1,1 +access_ir_sequence_date_range_public,access.ir.sequence.date.range.public,base.model_ir_sequence_date_range,base.group_public,1,1,1,1 +access_ir_sequence_public,access.ir.sequence.public,base.model_ir_sequence,base.group_portal,1,1,1,1 +access_ir_sequence_date_range_public,access.ir.sequence.date.range.public,base.model_ir_sequence_date_range,base.group_portal,1,1,1,1 +access_university_documents,access.university.document.portal,model_university_document,base.group_portal,1,1,1,1 +access_university_documents,access.university.document.portal,model_university_document,base.group_public,1,1,1,1 +access_university_documents,access.university.document.public,model_university_document,base.group_user,1,1,1,1 +access_university_student,access.university.student,model_university_student,base.group_portal,1,1,1,1 +access_university_student,access.university.student,model_university_student,base.group_user,1,1,1,1 diff --git a/education_university_management/static/description/assets/icons/check.png b/education_university_management/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/education_university_management/static/description/assets/icons/check.png differ diff --git a/education_university_management/static/description/assets/icons/chevron.png b/education_university_management/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/education_university_management/static/description/assets/icons/chevron.png differ diff --git a/education_university_management/static/description/assets/icons/cogs.png b/education_university_management/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/education_university_management/static/description/assets/icons/cogs.png differ diff --git a/education_university_management/static/description/assets/icons/consultation.png b/education_university_management/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/education_university_management/static/description/assets/icons/consultation.png differ diff --git a/education_university_management/static/description/assets/icons/ecom-black.png b/education_university_management/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/education_university_management/static/description/assets/icons/ecom-black.png differ diff --git a/education_university_management/static/description/assets/icons/education-black.png b/education_university_management/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/education_university_management/static/description/assets/icons/education-black.png differ diff --git a/education_university_management/static/description/assets/icons/hotel-black.png b/education_university_management/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/education_university_management/static/description/assets/icons/hotel-black.png differ diff --git a/education_university_management/static/description/assets/icons/license.png b/education_university_management/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/education_university_management/static/description/assets/icons/license.png differ diff --git a/education_university_management/static/description/assets/icons/lifebuoy.png b/education_university_management/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/education_university_management/static/description/assets/icons/lifebuoy.png differ diff --git a/education_university_management/static/description/assets/icons/manufacturing-black.png b/education_university_management/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/education_university_management/static/description/assets/icons/manufacturing-black.png differ diff --git a/education_university_management/static/description/assets/icons/pos-black.png b/education_university_management/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/education_university_management/static/description/assets/icons/pos-black.png differ diff --git a/education_university_management/static/description/assets/icons/puzzle.png b/education_university_management/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/education_university_management/static/description/assets/icons/puzzle.png differ diff --git a/education_university_management/static/description/assets/icons/restaurant-black.png b/education_university_management/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/education_university_management/static/description/assets/icons/restaurant-black.png differ diff --git a/education_university_management/static/description/assets/icons/service-black.png b/education_university_management/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/education_university_management/static/description/assets/icons/service-black.png differ diff --git a/education_university_management/static/description/assets/icons/trading-black.png b/education_university_management/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/education_university_management/static/description/assets/icons/trading-black.png differ diff --git a/education_university_management/static/description/assets/icons/training.png b/education_university_management/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/education_university_management/static/description/assets/icons/training.png differ diff --git a/education_university_management/static/description/assets/icons/update.png b/education_university_management/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/education_university_management/static/description/assets/icons/update.png differ diff --git a/education_university_management/static/description/assets/icons/user.png b/education_university_management/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/education_university_management/static/description/assets/icons/user.png differ diff --git a/education_university_management/static/description/assets/icons/wrench.png b/education_university_management/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/education_university_management/static/description/assets/icons/wrench.png differ diff --git a/education_university_management/static/description/assets/misc/categories.png b/education_university_management/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/education_university_management/static/description/assets/misc/categories.png differ diff --git a/education_university_management/static/description/assets/misc/check-box.png b/education_university_management/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/education_university_management/static/description/assets/misc/check-box.png differ diff --git a/education_university_management/static/description/assets/misc/compass.png b/education_university_management/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/education_university_management/static/description/assets/misc/compass.png differ diff --git a/education_university_management/static/description/assets/misc/corporate.png b/education_university_management/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/education_university_management/static/description/assets/misc/corporate.png differ diff --git a/education_university_management/static/description/assets/misc/customer-support.png b/education_university_management/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/education_university_management/static/description/assets/misc/customer-support.png differ diff --git a/education_university_management/static/description/assets/misc/cybrosys-logo.png b/education_university_management/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/education_university_management/static/description/assets/misc/cybrosys-logo.png differ diff --git a/education_university_management/static/description/assets/misc/features.png b/education_university_management/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/education_university_management/static/description/assets/misc/features.png differ diff --git a/education_university_management/static/description/assets/misc/logo.png b/education_university_management/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/education_university_management/static/description/assets/misc/logo.png differ diff --git a/education_university_management/static/description/assets/misc/pictures.png b/education_university_management/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/education_university_management/static/description/assets/misc/pictures.png differ diff --git a/education_university_management/static/description/assets/misc/pie-chart.png b/education_university_management/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/education_university_management/static/description/assets/misc/pie-chart.png differ diff --git a/education_university_management/static/description/assets/misc/right-arrow.png b/education_university_management/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/education_university_management/static/description/assets/misc/right-arrow.png differ diff --git a/education_university_management/static/description/assets/misc/star.png b/education_university_management/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/education_university_management/static/description/assets/misc/star.png differ diff --git a/education_university_management/static/description/assets/misc/support.png b/education_university_management/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/education_university_management/static/description/assets/misc/support.png differ diff --git a/education_university_management/static/description/assets/misc/whatsapp.png b/education_university_management/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/education_university_management/static/description/assets/misc/whatsapp.png differ diff --git a/education_university_management/static/description/assets/modules/M5.png b/education_university_management/static/description/assets/modules/M5.png new file mode 100644 index 000000000..a42e95b6a Binary files /dev/null and b/education_university_management/static/description/assets/modules/M5.png differ diff --git a/education_university_management/static/description/assets/modules/m1.jpg b/education_university_management/static/description/assets/modules/m1.jpg new file mode 100755 index 000000000..ac588a1b4 Binary files /dev/null and b/education_university_management/static/description/assets/modules/m1.jpg differ diff --git a/education_university_management/static/description/assets/modules/m2.png b/education_university_management/static/description/assets/modules/m2.png new file mode 100644 index 000000000..50ab04eaa Binary files /dev/null and b/education_university_management/static/description/assets/modules/m2.png differ diff --git a/education_university_management/static/description/assets/modules/m3.png b/education_university_management/static/description/assets/modules/m3.png new file mode 100644 index 000000000..c9d686d47 Binary files /dev/null and b/education_university_management/static/description/assets/modules/m3.png differ diff --git a/education_university_management/static/description/assets/modules/m4.png b/education_university_management/static/description/assets/modules/m4.png new file mode 100644 index 000000000..daaa4cb65 Binary files /dev/null and b/education_university_management/static/description/assets/modules/m4.png differ diff --git a/education_university_management/static/description/assets/modules/m6.png b/education_university_management/static/description/assets/modules/m6.png new file mode 100644 index 000000000..5c161433c Binary files /dev/null and b/education_university_management/static/description/assets/modules/m6.png differ diff --git a/education_university_management/static/description/assets/screenshots/U11.png b/education_university_management/static/description/assets/screenshots/U11.png new file mode 100644 index 000000000..607c4cdae Binary files /dev/null and b/education_university_management/static/description/assets/screenshots/U11.png differ diff --git a/education_university_management/static/description/assets/screenshots/hero.gif b/education_university_management/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..c7956dc19 Binary files /dev/null and b/education_university_management/static/description/assets/screenshots/hero.gif differ diff --git a/education_university_management/static/description/assets/screenshots/u1.png b/education_university_management/static/description/assets/screenshots/u1.png new file mode 100644 index 000000000..7d5282187 Binary files /dev/null and b/education_university_management/static/description/assets/screenshots/u1.png differ diff --git a/education_university_management/static/description/assets/screenshots/u10.png b/education_university_management/static/description/assets/screenshots/u10.png new file mode 100644 index 000000000..dc7225eb0 Binary files /dev/null and b/education_university_management/static/description/assets/screenshots/u10.png differ diff --git a/education_university_management/static/description/assets/screenshots/u2.png b/education_university_management/static/description/assets/screenshots/u2.png new file mode 100644 index 000000000..196929337 Binary files /dev/null and b/education_university_management/static/description/assets/screenshots/u2.png differ diff --git a/education_university_management/static/description/assets/screenshots/u3.png b/education_university_management/static/description/assets/screenshots/u3.png new file mode 100644 index 000000000..f434d9dbc Binary files /dev/null and b/education_university_management/static/description/assets/screenshots/u3.png differ diff --git a/education_university_management/static/description/assets/screenshots/u4.png b/education_university_management/static/description/assets/screenshots/u4.png new file mode 100644 index 000000000..b93c59a8a Binary files /dev/null and b/education_university_management/static/description/assets/screenshots/u4.png differ diff --git a/education_university_management/static/description/assets/screenshots/u5.png b/education_university_management/static/description/assets/screenshots/u5.png new file mode 100644 index 000000000..6c701c511 Binary files /dev/null and b/education_university_management/static/description/assets/screenshots/u5.png differ diff --git a/education_university_management/static/description/assets/screenshots/u6.png b/education_university_management/static/description/assets/screenshots/u6.png new file mode 100644 index 000000000..64ada4f87 Binary files /dev/null and b/education_university_management/static/description/assets/screenshots/u6.png differ diff --git a/education_university_management/static/description/assets/screenshots/u7.png b/education_university_management/static/description/assets/screenshots/u7.png new file mode 100644 index 000000000..1df62a554 Binary files /dev/null and b/education_university_management/static/description/assets/screenshots/u7.png differ diff --git a/education_university_management/static/description/assets/screenshots/u8.png b/education_university_management/static/description/assets/screenshots/u8.png new file mode 100644 index 000000000..e1dee8ac7 Binary files /dev/null and b/education_university_management/static/description/assets/screenshots/u8.png differ diff --git a/education_university_management/static/description/assets/screenshots/u9.png b/education_university_management/static/description/assets/screenshots/u9.png new file mode 100644 index 000000000..f559d7598 Binary files /dev/null and b/education_university_management/static/description/assets/screenshots/u9.png differ diff --git a/education_university_management/static/description/banner.jpg b/education_university_management/static/description/banner.jpg new file mode 100644 index 000000000..6a094ccd6 Binary files /dev/null and b/education_university_management/static/description/banner.jpg differ diff --git a/education_university_management/static/description/cybro_logo.png b/education_university_management/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/education_university_management/static/description/cybro_logo.png differ diff --git a/education_university_management/static/description/icon.png b/education_university_management/static/description/icon.png new file mode 100644 index 000000000..0b0949c0d Binary files /dev/null and b/education_university_management/static/description/icon.png differ diff --git a/education_university_management/static/description/index.html b/education_university_management/static/description/index.html new file mode 100644 index 000000000..367f4406c --- /dev/null +++ b/education_university_management/static/description/index.html @@ -0,0 +1,812 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+
+ + +
+
+
+

+ University Education Management

+

+ Insight to University Educational ERP

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ A strong and complete user-friendly ERP solution designed specifically + for college administration is University Educational ERP. Details such + as student entrance, enrollment information, faculty records, class + management, and subject administration are simple to administer. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ +
+ Student Application +
+
+
+ +
+ Student Details +
+
+
+ +
+ Batch Management +
+
+
+ +
+ Academic Year Management +
+
+ +
+ +
+ Course Management +
+
+
+ +
+ Department and Semester Management +
+
+ +
+ +
+ Subject Management +
+
+ +
+ +
+ Attendance Management +
+
+
+
+
+ +
+ Faculty Recruitment +
+
+
+ +
+ Timetable Management +
+
+
+ +
+ Academic Syllabus +
+
+
+ +
+ Exam Management +
+
+ +
+ +
+ Student Portal and Online Admission +
+
+ +
+ +
+ Student Documents +
+
+ +
+ +
+ Fees Management +
+
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Student Application

+

+ It handles registration and admission process for new + students.

+ +
+ +
+

+ Student Records

+

+ Maintains a strong database on student details like their + gender, sex, age, blood group etc. It gives an overview of the + student and his personal attributes.

+ +
+ +
+

+ Faculties

+

+ Efficiently handles all information on the professors, such as + their credentials, experience, and educational history. Each + faculty member has a connection to an employee, allowing for + proper tracking of their pay stubs and other financial + perks.

+ +
+ +
+

+ Batches

+

+ By taking into account every aspect of the students and assigned + faculties, the batch can be managed effectively. It provides + information on the total number of students in a batch and their + assigned faculties.

+ +
+ +
+

+ Student Attendance

+

+ It manages student attendance in batches.

+ +
+ +
+

+ Timetable Management

+

+ Manage schedule of taking subjects for every batch

+ +
+ +
+

+ Exam Management

+

+ Organise the many exam kinds that the university offers and + evaluate each subject individually.

+ +
+ +
+

+ Exam Result

+

+ Results for each student's exam.

+ +
+
+

+ Fees Management

+

+ Managing student fees in accordance with their courses and + amenities

+ +
+
+

+ Semester Management

+

+ Organise the entire semester across each department

+ +
+
+

+ Student Portal and Online Admission

+

+ Manage new portal design for students and Also take online + admission

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

+ Related + 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

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/education_university_management/static/src/css/web_style.css b/education_university_management/static/src/css/web_style.css new file mode 100644 index 000000000..e9fcc0d38 --- /dev/null +++ b/education_university_management/static/src/css/web_style.css @@ -0,0 +1,28 @@ +.btn_contact{ + position: absolute; + top: 71%; + left: 45%; + transform: translate(-50%, -50%); + -ms-transform: translate(-50%, -50%); + background-color: darkcyan; + color: white; + padding: 12px 24px; + border-radius: 5px; +} +.string_content1{ + position: absolute; + top: 60%; + left: 6%; + color: cornsilk; + font-size: 34px; + font-family: cursive; + font-weight: 600; +} +.string_content2{ + position: absolute; + top: 64%; + left: 6%; + color: black; + font-size: 34px; + font-family: cursive; +} diff --git a/education_university_management/static/src/img/addmission.jpg b/education_university_management/static/src/img/addmission.jpg new file mode 100644 index 000000000..d475c84a8 Binary files /dev/null and b/education_university_management/static/src/img/addmission.jpg differ diff --git a/education_university_management/static/src/img/faculty1.jpeg b/education_university_management/static/src/img/faculty1.jpeg new file mode 100644 index 000000000..acb514d26 Binary files /dev/null and b/education_university_management/static/src/img/faculty1.jpeg differ diff --git a/education_university_management/static/src/img/faculty2.png b/education_university_management/static/src/img/faculty2.png new file mode 100644 index 000000000..2ae351ec8 Binary files /dev/null and b/education_university_management/static/src/img/faculty2.png differ diff --git a/education_university_management/static/src/img/student1.jpeg b/education_university_management/static/src/img/student1.jpeg new file mode 100644 index 000000000..202fb0aa0 Binary files /dev/null and b/education_university_management/static/src/img/student1.jpeg differ diff --git a/education_university_management/static/src/img/student2.jpeg b/education_university_management/static/src/img/student2.jpeg new file mode 100644 index 000000000..16839cf35 Binary files /dev/null and b/education_university_management/static/src/img/student2.jpeg differ diff --git a/education_university_management/static/src/img/web2_banner.jpg b/education_university_management/static/src/img/web2_banner.jpg new file mode 100644 index 000000000..3e70b8f4f Binary files /dev/null and b/education_university_management/static/src/img/web2_banner.jpg differ diff --git a/education_university_management/static/src/js/online_application.js b/education_university_management/static/src/js/online_application.js new file mode 100644 index 000000000..c1c8c6322 --- /dev/null +++ b/education_university_management/static/src/js/online_application.js @@ -0,0 +1,46 @@ +/** @odoo-module **/ + +// This file is used for adding filtration for online application form fields + +import publicWidget from "web.public.widget"; +import rpc from 'web.rpc'; + +publicWidget.registry.OnlineApplication = publicWidget.Widget.extend({ + selector: '#online_appl_form', + events: { + 'change select[name="course"]': '_onCourseChange', + 'change select[name="department"]': '_onDepartmentChange', + }, + _onCourseChange: function (ev) { + var self = this + var course = ev.currentTarget.value; + self.$el.find('select[name="department"]').find('option').remove() + self.$el.find('select[name="department"]').append(""); + rpc.query({ + model:'university.department', + method: 'search_read', + args: [[['course_id', '=', parseInt(course)]]], + fields: ['name'], + }).then(function(result){ + result.forEach(function(item){ + self.$el.find('select[name="department"]').append(""); + }) + }); + }, + _onDepartmentChange: function (ev) { + var self = this + var department = ev.currentTarget.value; + self.$el.find('select[name="semester"]').find('option').remove() + self.$el.find('select[name="semester"]').append(""); + rpc.query({ + model:'university.semester', + method: 'search_read', + args: [[['department_id', '=', parseInt(department)]]], + fields: ['name'], + }).then(function(result){ + result.forEach(function(item){ + self.$el.find('select[name="semester"]').append(""); + }) + }); + } +}) diff --git a/education_university_management/views/account_journal_views.xml b/education_university_management/views/account_journal_views.xml new file mode 100644 index 000000000..61599c843 --- /dev/null +++ b/education_university_management/views/account_journal_views.xml @@ -0,0 +1,16 @@ + + + + + + account.journal.view.form.inherit.education.university.management + + account.journal + + + + + + + + diff --git a/education_university_management/views/account_move_views.xml b/education_university_management/views/account_move_views.xml new file mode 100644 index 000000000..60dfdd9ec --- /dev/null +++ b/education_university_management/views/account_move_views.xml @@ -0,0 +1,974 @@ + + + + + account.move.view.form.fee.receipt + account.move + +
+
+ +
+ + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ The current highest number is. You + might want to put a higher number here. +
+ +

+ + + Draft + +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+
+
+ +
+
+ + + + +
+
+
+ Quantity: + + +
+
+ Unit Price: + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +