diff --git a/advance_hr_attendance_dashboard/README.rst b/advance_hr_attendance_dashboard/README.rst new file mode 100644 index 000000000..ed0c7d598 --- /dev/null +++ b/advance_hr_attendance_dashboard/README.rst @@ -0,0 +1,46 @@ +.. 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 + +Advance HR Attendance Dashboard +=============================== +This Module Helps you to View Leaves of Employee Based on Different Leave Types. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developers: (V16): Rahul Rajeev ,Jumana Jabin MP ,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/advance_hr_attendance_dashboard/__init__.py b/advance_hr_attendance_dashboard/__init__.py new file mode 100644 index 000000000..5a341e7c2 --- /dev/null +++ b/advance_hr_attendance_dashboard/__init__.py @@ -0,0 +1,23 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +from . import models +from . import report diff --git a/advance_hr_attendance_dashboard/__manifest__.py b/advance_hr_attendance_dashboard/__manifest__.py new file mode 100644 index 000000000..9118f47cc --- /dev/null +++ b/advance_hr_attendance_dashboard/__manifest__.py @@ -0,0 +1,61 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +{ + "name": "Advance HR Attendance Dashboard", + "version": "16.0.1.0.0", + "category": "Human Resources", + "summary": """This module helps you to view leaves of employee based on + different leave types.""", + "description": """Advance HR Attendance Dashboard helps for + filtering attendance data, finding specific employees attendance data, + and for displaying attendance information, also we can print the + attendance in pdf format .""", + "author": "Cybrosys Techno Solutions", + "company": "Cybrosys Techno Solutions", + "maintainer": "Cybrosys Techno Solutions", + "website": "https://www.cybrosys.com", + "depends": ["hr_holidays", "hr", "hr_attendance"], + "data": [ + "views/hr_leave_type_views.xml", + "views/advance_hr_attendance_dashboard_menus.xml", + "views/res_config_settings_views.xml", + "report/hr_attendance_reports.xml", + "report/hr_attendance_templates.xml", + ], + "assets": { + "web.assets_backend": [ + "advance_hr_attendance_dashboard/static/src/xml/attendance_dashboard_templates.xml", + "advance_hr_attendance_dashboard/static/src/js/attendance_dashboard.js", + "advance_hr_attendance_dashboard/static/src/scss/attendance_dashboard.scss", + ], + }, + "external_dependencies": { + "python": ["pandas"], + }, + "images": [ + "static/description/banner.jpg", + ], + "license": "AGPL-3", + "installable": True, + "auto_install": False, + "application": False, +} diff --git a/advance_hr_attendance_dashboard/doc/RELEASE_NOTES.md b/advance_hr_attendance_dashboard/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..b9016897c --- /dev/null +++ b/advance_hr_attendance_dashboard/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 27.11.2023 +#### Version 16.0.1.0.0 +#### ADD + - Initial Commit for Advance HR Attendance Dashboard diff --git a/advance_hr_attendance_dashboard/models/__init__.py b/advance_hr_attendance_dashboard/models/__init__.py new file mode 100644 index 000000000..a0e8d3ee1 --- /dev/null +++ b/advance_hr_attendance_dashboard/models/__init__.py @@ -0,0 +1,24 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +from . import hr_employee +from . import hr_leave_type +from . import res_config_settings diff --git a/advance_hr_attendance_dashboard/models/hr_employee.py b/advance_hr_attendance_dashboard/models/hr_employee.py new file mode 100644 index 000000000..c6ee08912 --- /dev/null +++ b/advance_hr_attendance_dashboard/models/hr_employee.py @@ -0,0 +1,134 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +import pandas +from datetime import date, timedelta +from odoo import api, fields, models +from odoo.http import request +from odoo.tools import date_utils + + +class HrEmployee(models.Model): + """This module extends the 'hr.employee' model of Odoo Employees Module. + It adds a new method called 'get_employee_leave_data', which is used to + retrieve data for the dashboard.""" + _inherit = 'hr.employee' + _check_company_auto = True + + @api.model + def get_employee_leave_data(self, option): + """Returns data to the dashboard""" + employee_data = [] + res_config = self.env['res.config.settings'].search([], limit=1, + order='id desc') + dates = False + if option == 'this_week': + dates = pandas.date_range( + date_utils.start_of(fields.Date.today(), 'week'), + date_utils.end_of(fields.Date.today(), 'week') - timedelta( + days=0), + freq='d').strftime( + "%Y-%m-%d").tolist() + elif option == 'this_month': + dates = pandas.date_range( + date_utils.start_of(fields.Date.today(), 'month'), + date_utils.end_of(fields.Date.today(), 'month') - timedelta( + days=0), + freq='d').strftime( + "%Y-%m-%d").tolist() + elif option == 'last_15_days': + dates = [str(date.today() - timedelta(days=day)) + for day in range(15)] + cids = request.httprequest.cookies.get('cids') + allowed_company_ids = [int(cid) for cid in cids.split(',')] + for employee in self.env['hr.employee'].search( + [('company_id', '=', allowed_company_ids)]): + leave_data = [] + employee_present_dates = [] + employee_leave_dates = [] + total_absent_count = 0 + query = (""" + SELECT hl.id,employee_id,request_date_from,request_date_to, + hlt.leave_code,hlt.color + FROM hr_leave hl + INNER JOIN hr_leave_type hlt ON hlt.id = hl.holiday_status_id + WHERE hl.state = 'validate' AND employee_id = '%s'""" + % employee.id) + self._cr.execute(query) + all_leave_rec = self._cr.dictfetchall() + for leave in all_leave_rec: + leave_dates = pandas.date_range( + leave.get('request_date_from'), + leave.get('request_date_to') - timedelta( + days=0), + freq='d').strftime( + "%Y-%m-%d").tolist() + leave_dates.insert(0, leave.get('leave_code')) + leave_dates.insert(1, leave.get('color')) + for leave_date in leave_dates: + if leave_date in dates: + employee_leave_dates.append( + leave_date + ) + for employee_check_in in employee.attendance_ids: + employee_present_dates.append( + str(employee_check_in.check_in.date())) + for leave_date in dates: + color = "#ffffff" + marks = self.env[ + 'res.config.settings'].search([], limit=1) + state = None + if marks: + if leave_date in employee_present_dates: + state = res_config.present + else: + state = res_config.absent + if leave_date in employee_leave_dates: + state = leave_dates[0] + color = "#F06050" if leave_dates[1] == 1 \ + else "#F4A460" if leave_dates[1] == 2 \ + else "#F7CD1F" if leave_dates[1] == 3 \ + else "#6CC1ED" if leave_dates[1] == 4 \ + else "#814968" if leave_dates[1] == 5 \ + else "#EB7E7F" if leave_dates[1] == 6 \ + else "#2C8397" if leave_dates[1] == 7 \ + else "#475577" if leave_dates[1] == 8 \ + else "#D6145F" if leave_dates[1] == 9 \ + else "#30C381" if leave_dates[1] == 10 \ + else "#9365B8" if leave_dates[1] == 11 \ + else "#ffffff" + total_absent_count += 1 + leave_data.append({ + 'id': employee.id, + 'leave_date': leave_date, + 'state': state, + 'color': color + }) + employee_data.append({ + 'id': employee.id, + 'name': employee.name, + 'leave_data': leave_data[::-1], + 'total_absent_count': total_absent_count + }) + return { + 'employee_data': employee_data, + 'filtered_duration_dates': dates[::-1] + } diff --git a/advance_hr_attendance_dashboard/models/hr_leave_type.py b/advance_hr_attendance_dashboard/models/hr_leave_type.py new file mode 100644 index 000000000..7e5564a98 --- /dev/null +++ b/advance_hr_attendance_dashboard/models/hr_leave_type.py @@ -0,0 +1,52 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +from odoo import fields, models + + +class HrLeaveType(models.Model): + """This module inherits from the 'hr.leave.type' model of the Odoo Time Off + Module. It adds a new field called 'leave_code', which is a selection field + that allows users to choose from a list of predefined leave codes.""" + _inherit = 'hr.leave.type' + + leave_code = fields.Selection( + [('UL', 'UL'), + ('SL', 'SL'), + ('RL', 'RL'), + ('NL', 'NL'), + ('ML', 'ML'), + ('FL', 'FL'), + ('CL', 'CL'), + ('PL', 'PL'), + ('OL', 'OL')], + required=True, + string="Leave Code", + default="NL", + help="UL = Unpaid Leave\n" + " SL = Sick Leave\n" + " RL = Regular Leave\n" + " NL = Normal Leave\n" + " ML = Maternity Leave\n" + " FL = Festival Leave\n" + " CL = Compensatory Leave\n" + " PL = Paid Leave\n" + " OL = Other Leave") diff --git a/advance_hr_attendance_dashboard/models/res_config_settings.py b/advance_hr_attendance_dashboard/models/res_config_settings.py new file mode 100644 index 000000000..7b64391d4 --- /dev/null +++ b/advance_hr_attendance_dashboard/models/res_config_settings.py @@ -0,0 +1,45 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + """This class extends the `res.config.settings` model to add configuration + settings for the HR Attendance Dashboard's default present and absent + marks. """ + _inherit = 'res.config.settings' + + present = fields.Selection([('present', 'Present'), + ('\u2714', '✔'), ('\u2705', '✅ '), ('p', 'P')], + string='Default Present Mark', + config_parameter='advance_hr_attendance_' + 'dashboard.present', + help='Select the default mark for present ' + 'attendance.') + absent = fields.Selection([('absent', 'Absent'), + ('\u2716', '✘'), ('\u274C', '❌'), + ('\u2B55', '⭕'), ('a', 'A') + ], string='Default Absent Mark', + config_parameter='advance_hr_attendance_' + 'dashboard.absent', + help='Select the default mark for absent ' + 'attendance.') diff --git a/advance_hr_attendance_dashboard/report/__init__.py b/advance_hr_attendance_dashboard/report/__init__.py new file mode 100644 index 000000000..b0edcf926 --- /dev/null +++ b/advance_hr_attendance_dashboard/report/__init__.py @@ -0,0 +1,22 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +from . import hr_attendance_report diff --git a/advance_hr_attendance_dashboard/report/hr_attendance_report.py b/advance_hr_attendance_dashboard/report/hr_attendance_report.py new file mode 100644 index 000000000..3f4fc7a5e --- /dev/null +++ b/advance_hr_attendance_dashboard/report/hr_attendance_report.py @@ -0,0 +1,37 @@ +# -- coding: utf-8 -- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +from odoo import api, models + + +class ReportHrAttendance(models.AbstractModel): + """This is an abstract model for the Attendance Report of Employees.""" + _name = 'report.advance_hr_attendance_dashboard.report_hr_attendance' + _description = 'Attendance Report of Employees' + + @api.model + def _get_report_values(self, doc_ids, data=None): + """Get the report values for the Attendance Report.""" + return { + 'doc_model': 'hr.attendance', + 'data': data, + 'self': self, + } diff --git a/advance_hr_attendance_dashboard/report/hr_attendance_reports.xml b/advance_hr_attendance_dashboard/report/hr_attendance_reports.xml new file mode 100644 index 000000000..3d8285ec3 --- /dev/null +++ b/advance_hr_attendance_dashboard/report/hr_attendance_reports.xml @@ -0,0 +1,15 @@ + + + + + Attendance Report + hr.employee + qweb-pdf + advance_hr_attendance_dashboard.report_hr_attendance + advance_hr_attendance_dashboard.report_hr_attendance + + diff --git a/advance_hr_attendance_dashboard/report/hr_attendance_templates.xml b/advance_hr_attendance_dashboard/report/hr_attendance_templates.xml new file mode 100644 index 000000000..56bc1d32b --- /dev/null +++ b/advance_hr_attendance_dashboard/report/hr_attendance_templates.xml @@ -0,0 +1,21 @@ + + + + + diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/check.png b/advance_hr_attendance_dashboard/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/check.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/chevron.png b/advance_hr_attendance_dashboard/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/chevron.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/cogs.png b/advance_hr_attendance_dashboard/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/cogs.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/consultation.png b/advance_hr_attendance_dashboard/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/consultation.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/ecom-black.png b/advance_hr_attendance_dashboard/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/ecom-black.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/education-black.png b/advance_hr_attendance_dashboard/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/education-black.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/hotel-black.png b/advance_hr_attendance_dashboard/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/hotel-black.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/license.png b/advance_hr_attendance_dashboard/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/license.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/lifebuoy.png b/advance_hr_attendance_dashboard/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/lifebuoy.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/manufacturing-black.png b/advance_hr_attendance_dashboard/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/manufacturing-black.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/pos-black.png b/advance_hr_attendance_dashboard/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/pos-black.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/puzzle.png b/advance_hr_attendance_dashboard/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/puzzle.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/restaurant-black.png b/advance_hr_attendance_dashboard/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/restaurant-black.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/service-black.png b/advance_hr_attendance_dashboard/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/service-black.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/trading-black.png b/advance_hr_attendance_dashboard/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/trading-black.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/training.png b/advance_hr_attendance_dashboard/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/training.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/update.png b/advance_hr_attendance_dashboard/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/update.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/user.png b/advance_hr_attendance_dashboard/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/user.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/icons/wrench.png b/advance_hr_attendance_dashboard/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/icons/wrench.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/misc/categories.png b/advance_hr_attendance_dashboard/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/misc/categories.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/misc/check-box.png b/advance_hr_attendance_dashboard/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/misc/check-box.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/misc/compass.png b/advance_hr_attendance_dashboard/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/misc/compass.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/misc/corporate.png b/advance_hr_attendance_dashboard/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/misc/corporate.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/misc/customer-support.png b/advance_hr_attendance_dashboard/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/misc/customer-support.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/misc/cybrosys-logo.png b/advance_hr_attendance_dashboard/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/misc/cybrosys-logo.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/misc/features.png b/advance_hr_attendance_dashboard/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/misc/features.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/misc/logo.png b/advance_hr_attendance_dashboard/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/misc/logo.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/misc/pictures.png b/advance_hr_attendance_dashboard/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/misc/pictures.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/misc/pie-chart.png b/advance_hr_attendance_dashboard/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/misc/pie-chart.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/misc/right-arrow.png b/advance_hr_attendance_dashboard/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/misc/right-arrow.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/misc/star.png b/advance_hr_attendance_dashboard/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/misc/star.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/misc/support.png b/advance_hr_attendance_dashboard/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/misc/support.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/misc/whatsapp.png b/advance_hr_attendance_dashboard/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/misc/whatsapp.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/modules/11.png b/advance_hr_attendance_dashboard/static/description/assets/modules/11.png new file mode 100644 index 000000000..f3c986fc1 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/modules/11.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/modules/12.png b/advance_hr_attendance_dashboard/static/description/assets/modules/12.png new file mode 100644 index 000000000..25ed3e0b6 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/modules/12.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/modules/13.png b/advance_hr_attendance_dashboard/static/description/assets/modules/13.png new file mode 100644 index 000000000..17c14989e Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/modules/13.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/modules/14.png b/advance_hr_attendance_dashboard/static/description/assets/modules/14.png new file mode 100644 index 000000000..5c56f0bcd Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/modules/14.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/modules/15.png b/advance_hr_attendance_dashboard/static/description/assets/modules/15.png new file mode 100644 index 000000000..6c8c8adc3 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/modules/15.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/modules/16.png b/advance_hr_attendance_dashboard/static/description/assets/modules/16.png new file mode 100644 index 000000000..8eb34c3c5 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/modules/16.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/1.png b/advance_hr_attendance_dashboard/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..c553d2b09 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/1.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/hero.gif b/advance_hr_attendance_dashboard/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..16c6adb09 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/hero.gif differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/hr_attendance_dashboard1.png b/advance_hr_attendance_dashboard/static/description/assets/screenshots/hr_attendance_dashboard1.png new file mode 100644 index 000000000..827809622 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/hr_attendance_dashboard1.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/hr_attendance_dashboard2.png b/advance_hr_attendance_dashboard/static/description/assets/screenshots/hr_attendance_dashboard2.png new file mode 100644 index 000000000..3f8d80c9f Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/hr_attendance_dashboard2.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/hr_attendance_dashboard3.png b/advance_hr_attendance_dashboard/static/description/assets/screenshots/hr_attendance_dashboard3.png new file mode 100644 index 000000000..5ab5ee28a Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/hr_attendance_dashboard3.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/hr_attendance_dashboard4.png b/advance_hr_attendance_dashboard/static/description/assets/screenshots/hr_attendance_dashboard4.png new file mode 100644 index 000000000..846a9e5b3 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/hr_attendance_dashboard4.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/hr_attendance_dashboard5.png b/advance_hr_attendance_dashboard/static/description/assets/screenshots/hr_attendance_dashboard5.png new file mode 100644 index 000000000..8787a059a Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/hr_attendance_dashboard5.png differ diff --git a/advance_hr_attendance_dashboard/static/description/banner.jpg b/advance_hr_attendance_dashboard/static/description/banner.jpg new file mode 100644 index 000000000..94fc9e009 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/banner.jpg differ diff --git a/advance_hr_attendance_dashboard/static/description/icon.png b/advance_hr_attendance_dashboard/static/description/icon.png new file mode 100644 index 000000000..1ec97d71b Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/icon.png differ diff --git a/advance_hr_attendance_dashboard/static/description/index.html b/advance_hr_attendance_dashboard/static/description/index.html new file mode 100644 index 000000000..6c2f46c10 --- /dev/null +++ b/advance_hr_attendance_dashboard/static/description/index.html @@ -0,0 +1,662 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.Sh +
+
+
+ +
+
+
+ +

+ Advance HR Attendance Dashboard

+

+ An Advanced Dashboard For Monitoring And Managing The Employees Attendance Data. +

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This Module Helps you to View Leaves of Employee Based on Different + Leave Types. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + View Leaves of Employee Based on Different Leave Types. +
+
+ + Print PDF Report. +
+
+
+
+ + Filter Based on Employee Name. +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+ +
+

+ Set Leave Code in Time Off Types +

+ +
+
+

+ Set Default Present Mark For Present And Default Absent Mark + For Absent From Configuration. +

+ +
+ + +
+

+ HR Attendance Dashboard +

+ +
+ +
+

+ Print PDF Report +

+ +
+ +
+

+ PDF Report View +

+ +
+ +
+

+ Search Bar +

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

+ 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/advance_hr_attendance_dashboard/static/src/js/attendance_dashboard.js b/advance_hr_attendance_dashboard/static/src/js/attendance_dashboard.js new file mode 100644 index 000000000..72e3b219e --- /dev/null +++ b/advance_hr_attendance_dashboard/static/src/js/attendance_dashboard.js @@ -0,0 +1,68 @@ +/* @odoo-module */ +const { Component, useState, useRef} = owl; +import { registry } from "@web/core/registry"; +import rpc from "web.rpc"; +import { useService } from "@web/core/utils/hooks"; +class AttendanceDashboard extends Component{ + setup(){ + this.action = useService('action') + this.state = useState({ + filteredDurationDates : [], + employeeData : [] + }) + this.root = useRef('attendance-dashboard') + } + /** + * Event handler for the 'change' event of the filter input element. + * It triggers the onclick_this_filter method with the new filter value. + * @param {Event} ev - The change event object. + */ + onChangeFilter(ev){ + ev.stopPropagation(); + this.onclick_this_filter(ev.target.value); + } + //on clicking search button, employees will be filtered + _OnClickSearchEmployee(ev){ + let searchbar = this.root.el.querySelector('#search-bar').value?.toLowerCase() + var attendance_table_rows = this.root.el.querySelector('#attendance_table_nm').children[1] + for (let tableData of attendance_table_rows.children){ + tableData.style.display = (!tableData.children[0].getAttribute("data-name").toLowerCase().includes(searchbar)) ? 'none':''; + } + } + //on clicking Print PDF button, report will be printed + _OnClickPdfReport(ev){ + const table = this.root.el.querySelector('#attendance_table_nm') + let tHead = table.children[0].innerHTML + let tBody = table.children[1].innerHTML + return this.action.doAction({ + type: 'ir.actions.report', + report_type: 'qweb-pdf', + report_name: 'advance_hr_attendance_dashboard.report_hr_attendance', + report_file: 'advance_hr_attendance_dashboard.report_hr_attendance', + data: {'tHead':tHead, 'tBody': tBody} +}); + } + async onclick_this_filter(ev) { + await rpc.query({ + model: "hr.employee", + method: "get_employee_leave_data", + args: [ev] + }).then((result) =>{ + this.result = result + this.state.filteredDurationDates = result.filtered_duration_dates + this.state.employeeData = result.employee_data + }); + } + formatDate(inputDate) { + const months = [ + 'JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', + 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC' ]; + const parts = inputDate.split('-'); + const day = parts[2]; + const month = months[parseInt(parts[1], 10) - 1]; + const year = parts[0]; + return `${day}-${month}-${year}`; +} +} +AttendanceDashboard.template = 'AttendanceDashboard'; +registry.category("actions").add("attendance_dashboard", AttendanceDashboard); diff --git a/advance_hr_attendance_dashboard/static/src/scss/attendance_dashboard.scss b/advance_hr_attendance_dashboard/static/src/scss/attendance_dashboard.scss new file mode 100644 index 000000000..22f2707b2 --- /dev/null +++ b/advance_hr_attendance_dashboard/static/src/scss/attendance_dashboard.scss @@ -0,0 +1,12 @@ +.attendance_table{ + float:left; + margin:22px 10px; +} +.attendance th , thead , tr , tbody , tfoot{ + padding:1em; + border:1px solid #ccc; +} +.table-data{ + border-left:1px solid; + color: grey; +} diff --git a/advance_hr_attendance_dashboard/static/src/xml/attendance_dashboard_templates.xml b/advance_hr_attendance_dashboard/static/src/xml/attendance_dashboard_templates.xml new file mode 100644 index 000000000..35bc81a8c --- /dev/null +++ b/advance_hr_attendance_dashboard/static/src/xml/attendance_dashboard_templates.xml @@ -0,0 +1,87 @@ + + diff --git a/advance_hr_attendance_dashboard/views/advance_hr_attendance_dashboard_menus.xml b/advance_hr_attendance_dashboard/views/advance_hr_attendance_dashboard_menus.xml new file mode 100644 index 000000000..16b3563d8 --- /dev/null +++ b/advance_hr_attendance_dashboard/views/advance_hr_attendance_dashboard_menus.xml @@ -0,0 +1,13 @@ + + + + + Attendance Dashboard + attendance_dashboard + + + + diff --git a/advance_hr_attendance_dashboard/views/hr_leave_type_views.xml b/advance_hr_attendance_dashboard/views/hr_leave_type_views.xml new file mode 100644 index 000000000..98e1d8c27 --- /dev/null +++ b/advance_hr_attendance_dashboard/views/hr_leave_type_views.xml @@ -0,0 +1,21 @@ + + + + + + hr.leave.type.view.form.inherit.advance.hr.attendance.dashboard + + hr.leave.type + + + + + + + + diff --git a/advance_hr_attendance_dashboard/views/res_config_settings_views.xml b/advance_hr_attendance_dashboard/views/res_config_settings_views.xml new file mode 100644 index 000000000..6b53f4e33 --- /dev/null +++ b/advance_hr_attendance_dashboard/views/res_config_settings_views.xml @@ -0,0 +1,56 @@ + + + + + + res.config.settings.view.form.inherit.advance.hr.attendance.dashboard + + res.config.settings + + + + +
+

Choose Attendance Marks

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