diff --git a/advance_hr_attendance_dashboard/README.rst b/advance_hr_attendance_dashboard/README.rst new file mode 100644 index 000000000..e582ae1c6 --- /dev/null +++ b/advance_hr_attendance_dashboard/README.rst @@ -0,0 +1,44 @@ +.. 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 +============================== +* Attendance module for Odoo 15. + +Installation +============ + - www.odoo.com/documentation/15.0/setup/install.html + - Install our custom addon + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developers: (V16) Nihala KP @cybrosys + +Contacts +-------- +* Mail Contact : odoo@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 +========== +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + + +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..579ed6af5 --- /dev/null +++ b/advance_hr_attendance_dashboard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technogies @cybrosys(odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models +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..0f7bec1c5 --- /dev/null +++ b/advance_hr_attendance_dashboard/__manifest__.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technogies @cybrosys(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': 'Advance HR Attendance Dashboard', + 'version': '15.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/js/attendance_dashboard.js", + "advance_hr_attendance_dashboard/static/src/scss/attendance_dashboard.scss", + ], + 'web.assets_qweb': [ + "advance_hr_attendance_dashboard/static/src/xml/attendance_dashboard_templates.xml", + ], + }, + "external_dependencies": { + "python": ["pandas"], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': 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..986d9968b --- /dev/null +++ b/advance_hr_attendance_dashboard/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 24.04.2024 +#### Version 15.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..f0d70137f --- /dev/null +++ b/advance_hr_attendance_dashboard/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technogies @cybrosys(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 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..c44962265 --- /dev/null +++ b/advance_hr_attendance_dashboard/models/hr_employee.py @@ -0,0 +1,136 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technogies @cybrosys(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 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 = [] + 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['ir.config_parameter'].sudo().get_param( + 'advance_hr_attendance_' + 'dashboard.present') + absent = self.env['ir.config_parameter'].sudo().get_param( + 'advance_hr_attendance_' + 'dashboard.absent') + state = None + if marks: + if leave_date in employee_present_dates: + state = marks.capitalize() + else: + state = absent.capitalize() + 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..0fbff1f3d --- /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) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technogies @cybrosys(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 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..fbcc216b8 --- /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) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technogies @cybrosys(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 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..13ac1ca97 --- /dev/null +++ b/advance_hr_attendance_dashboard/report/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technogies @cybrosys(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 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..b1ace7088 --- /dev/null +++ b/advance_hr_attendance_dashboard/report/hr_attendance_report.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Technogies @cybrosys(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, 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.""" + print(data) + 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..582a82d5d --- /dev/null +++ b/advance_hr_attendance_dashboard/report/hr_attendance_reports.xml @@ -0,0 +1,32 @@ + + + + + A4 - statement + + A4 + 0 + 0 + Landscape + 20 + 32 + 7 + 7 + + 15 + 90 + + + 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/auto_database_backup.gif b/advance_hr_attendance_dashboard/static/description/assets/modules/auto_database_backup.gif new file mode 100644 index 000000000..591c8b18d Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/modules/auto_database_backup.gif differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/modules/hide_menu_user.png b/advance_hr_attendance_dashboard/static/description/assets/modules/hide_menu_user.png new file mode 100644 index 000000000..6bc155887 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/modules/hide_menu_user.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/modules/multi_branch_base.png b/advance_hr_attendance_dashboard/static/description/assets/modules/multi_branch_base.png new file mode 100644 index 000000000..6f654cfdb Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/modules/multi_branch_base.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/modules/odoo_dynamic_dashboard.png b/advance_hr_attendance_dashboard/static/description/assets/modules/odoo_dynamic_dashboard.png new file mode 100644 index 000000000..3599974eb Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/modules/odoo_dynamic_dashboard.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/modules/odoo_website_helpdesk.png b/advance_hr_attendance_dashboard/static/description/assets/modules/odoo_website_helpdesk.png new file mode 100644 index 000000000..f19f3578e Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/modules/odoo_website_helpdesk.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/modules/web_login_styles.png b/advance_hr_attendance_dashboard/static/description/assets/modules/web_login_styles.png new file mode 100644 index 000000000..e20126a45 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/modules/web_login_styles.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/10.png b/advance_hr_attendance_dashboard/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..0bb733dec Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/10.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/2.png b/advance_hr_attendance_dashboard/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..1989d14c1 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/2.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/3.png b/advance_hr_attendance_dashboard/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..b25c4a912 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/3.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/4.png b/advance_hr_attendance_dashboard/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..e03aef651 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/4.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/5.png b/advance_hr_attendance_dashboard/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..839982a4f Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/5.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/6.png b/advance_hr_attendance_dashboard/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..c79bb149b Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/6.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/7.png b/advance_hr_attendance_dashboard/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..5748b97bc Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/7.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/9.png b/advance_hr_attendance_dashboard/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..5c87289b9 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/9.png differ diff --git a/advance_hr_attendance_dashboard/static/description/assets/screenshots/v15-hero.gif b/advance_hr_attendance_dashboard/static/description/assets/screenshots/v15-hero.gif new file mode 100644 index 000000000..452b34602 Binary files /dev/null and b/advance_hr_attendance_dashboard/static/description/assets/screenshots/v15-hero.gif 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..513e98beb 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..d1fe10358 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..35204c68b --- /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 filtered by Week.

+ +
+ +
+

+ HR Attendance Dashboard filtered by 15 days. +

+ +
+ +
+

+ HR Attendance Dashboard filtered by Monthly. +

+ +
+
+

+ HR Attendance Dashboard filtered by Employee. +

+ +
+
+

+ PDF reports +

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

+ 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

+
+
+
+
+
+
+
+ +
+
+
+ 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..1280b0fc0 --- /dev/null +++ b/advance_hr_attendance_dashboard/static/src/js/attendance_dashboard.js @@ -0,0 +1,65 @@ +/* @odoo-module */ +const { Component, useState } = owl; +const { useRef } = owl.hooks; +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') + // Apply the "This Week" filter by default + this.onclick_this_filter("this_week") + } + onChangeFilter(ev) { + ev.stopPropagation(); + this.onclick_this_filter(ev.target.value); + } + _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' : ''; + } + } + _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(filter) { + await rpc.query({ + model: "hr.employee", + method: "get_employee_leave_data", + args: [filter] + }).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..0e3ac2f81 --- /dev/null +++ b/advance_hr_attendance_dashboard/static/src/xml/attendance_dashboard_templates.xml @@ -0,0 +1,96 @@ + + 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..6027072c9 --- /dev/null +++ b/advance_hr_attendance_dashboard/views/res_config_settings_views.xml @@ -0,0 +1,54 @@ + + + + + + res.config.settings.view.form.inherit.advance.hr.attendance.dashboard + + res.config.settings + + + + +

Choose Attendance Marks

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