@ -0,0 +1,49 @@ | 
				
			|||||
 | 
					.. 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 <https://cybrosys.com/>`__ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					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 , | 
				
			||||
 | 
					              (V17): Ranjith R, | 
				
			||||
 | 
					              (V18):Gayathri V, | 
				
			||||
 | 
					  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 <https://cybrosys.com/>`__ | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					Further information | 
				
			||||
 | 
					=================== | 
				
			||||
 | 
					HTML Description: `<static/description/index.html>`__ | 
				
			||||
@ -0,0 +1,21 @@ | 
				
			|||||
 | 
					# -*- coding: utf-8 -*- | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Cybrosys Technologies Pvt. Ltd. | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | 
				
			||||
 | 
					#    Author: Gayathri V(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. | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					from . import models | 
				
			||||
 | 
					from . import report | 
				
			||||
@ -0,0 +1,59 @@ | 
				
			|||||
 | 
					# -*- coding: utf-8 -*- | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Cybrosys Technologies Pvt. Ltd. | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | 
				
			||||
 | 
					#    Author: Gayathri V(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. | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					{ | 
				
			||||
 | 
					    "name": "Advance HR Attendance Dashboard", | 
				
			||||
 | 
					    "version": "18.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.png", | 
				
			||||
 | 
					    ], | 
				
			||||
 | 
					    "license": "AGPL-3", | 
				
			||||
 | 
					    "installable": True, | 
				
			||||
 | 
					    "auto_install": False, | 
				
			||||
 | 
					    "application": False, | 
				
			||||
 | 
					} | 
				
			||||
@ -0,0 +1,6 @@ | 
				
			|||||
 | 
					## Module <advance_hr_attendance_dashboard> | 
				
			||||
 | 
					
 | 
				
			||||
 | 
					#### 13.09.2024 | 
				
			||||
 | 
					#### Version 18.0.1.0.0 | 
				
			||||
 | 
					#### ADD | 
				
			||||
 | 
					 - Initial Commit for Advance HR Attendance Dashboard | 
				
			||||
@ -0,0 +1,22 @@ | 
				
			|||||
 | 
					# -*- coding: utf-8 -*- | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Cybrosys Technologies Pvt. Ltd. | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | 
				
			||||
 | 
					#    Author: Gayathri V(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. | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					from . import hr_employee | 
				
			||||
 | 
					from . import hr_leave_type | 
				
			||||
 | 
					from . import res_config_settings | 
				
			||||
@ -0,0 +1,134 @@ | 
				
			|||||
 | 
					# -*- coding: utf-8 -*- | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Cybrosys Technologies Pvt. Ltd. | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | 
				
			||||
 | 
					#    Author: Gayathri V(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. | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					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] | 
				
			||||
 | 
					        } | 
				
			||||
@ -0,0 +1,50 @@ | 
				
			|||||
 | 
					# -*- coding: utf-8 -*- | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Cybrosys Technologies Pvt. Ltd. | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | 
				
			||||
 | 
					#    Author: Gayathri V(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. | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					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") | 
				
			||||
@ -0,0 +1,43 @@ | 
				
			|||||
 | 
					# -*- coding: utf-8 -*- | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Cybrosys Technologies Pvt. Ltd. | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | 
				
			||||
 | 
					#    Author: Gayathri V(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. | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					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.') | 
				
			||||
@ -0,0 +1,20 @@ | 
				
			|||||
 | 
					# -*- coding: utf-8 -*- | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Cybrosys Technologies Pvt. Ltd. | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | 
				
			||||
 | 
					#    Author: Gayathri V(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. | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					from . import hr_attendance_report | 
				
			||||
@ -0,0 +1,35 @@ | 
				
			|||||
 | 
					# -*- coding: utf-8 -*- | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Cybrosys Technologies Pvt. Ltd. | 
				
			||||
 | 
					# | 
				
			||||
 | 
					#    Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | 
				
			||||
 | 
					#    Author: Gayathri V(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. | 
				
			||||
 | 
					############################################################################### | 
				
			||||
 | 
					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, | 
				
			||||
 | 
					        } | 
				
			||||
@ -0,0 +1,16 @@ | 
				
			|||||
 | 
					<?xml version="1.0" encoding="UTF-8" ?> | 
				
			||||
 | 
					<odoo> | 
				
			||||
 | 
					    <!-- | 
				
			||||
 | 
					   This XML snippet defines an action for generating the Attendance Report in PDF format. | 
				
			||||
 | 
					   It associates the report with the 'hr.employee' model and specifies the QWeb PDF report type. | 
				
			||||
 | 
					   The 'report_name' and 'report_file' fields provide the technical names of the report to be used. | 
				
			||||
 | 
					   --> | 
				
			||||
 | 
					    <record id="action_report_hr_attendance" model="ir.actions.report"> | 
				
			||||
 | 
					        <field name="name">Attendance Report</field> | 
				
			||||
 | 
					        <field name="model">hr.employee</field> | 
				
			||||
 | 
					        <field name="report_type">qweb-pdf</field> | 
				
			||||
 | 
					        <field name="report_name">advance_hr_attendance_dashboard.report_hr_attendance</field> | 
				
			||||
 | 
					        <field name="report_file">advance_hr_attendance_dashboard.report_hr_attendance</field> | 
				
			||||
 | 
					        <field name="paperformat_id" ref="hr_holidays.paperformat_hrsummary"/> | 
				
			||||
 | 
					    </record> | 
				
			||||
 | 
					</odoo> | 
				
			||||
@ -0,0 +1,21 @@ | 
				
			|||||
 | 
					<?xml version="1.0" encoding="UTF-8" ?> | 
				
			||||
 | 
					<odoo> | 
				
			||||
 | 
					    <!-- | 
				
			||||
 | 
					        This template defines the structure and layout for the Attendance Report. | 
				
			||||
 | 
					        It uses two call tags to include other templates for the external layout and HTML container. | 
				
			||||
 | 
					        The report data is expected to contain 'tHead' and 'tBody' keys for the table's header and body content, respectively. | 
				
			||||
 | 
					        --> | 
				
			||||
 | 
					    <template id="report_hr_attendance"> | 
				
			||||
 | 
					        <t t-call="web.html_container"> | 
				
			||||
 | 
					            <t t-call="web.internal_layout"> | 
				
			||||
 | 
					                <div class="page"> | 
				
			||||
 | 
					                    <h2>Attendance Report</h2> | 
				
			||||
 | 
					                    <table class="table"> | 
				
			||||
 | 
					                        <div t-raw="data['tHead']"/> | 
				
			||||
 | 
					                        <div t-raw="data['tBody']"/> | 
				
			||||
 | 
					                    </table> | 
				
			||||
 | 
					                </div> | 
				
			||||
 | 
					            </t> | 
				
			||||
 | 
					        </t> | 
				
			||||
 | 
					    </template> | 
				
			||||
 | 
					</odoo> | 
				
			||||
| 
		 After Width: | Height: | Size: 2.2 KiB  | 
| 
		 After Width: | Height: | Size: 28 KiB  | 
| 
		 After Width: | Height: | Size: 1.1 KiB  | 
| 
		 After Width: | Height: | Size: 210 KiB  | 
| 
		 After Width: | Height: | Size: 209 KiB  | 
| 
		 After Width: | Height: | Size: 109 KiB  | 
| 
		 After Width: | Height: | Size: 495 B  | 
| 
		 After Width: | Height: | Size: 1.0 KiB  | 
| 
		 After Width: | Height: | Size: 624 B  | 
| 
		 After Width: | Height: | Size: 136 KiB  | 
| 
		 After Width: | Height: | Size: 214 KiB  | 
| 
		 After Width: | Height: | Size: 36 KiB  | 
| 
		 After Width: | Height: | Size: 36 KiB  | 
| 
		 After Width: | Height: | Size: 3.6 KiB  | 
| 
		 After Width: | Height: | Size: 310 B  | 
| 
		 After Width: | Height: | Size: 929 B  | 
| 
		 After Width: | Height: | Size: 1.3 KiB  | 
| 
		 After Width: | Height: | Size: 3.3 KiB  | 
| 
		 After Width: | Height: | Size: 1.4 KiB  | 
| 
		 After Width: | Height: | Size: 17 KiB  | 
| 
		 After Width: | Height: | Size: 542 B  | 
| 
		 After Width: | Height: | Size: 576 B  | 
| 
		 After Width: | Height: | Size: 733 B  | 
| 
		 After Width: | Height: | Size: 4.3 KiB  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 4.0 KiB  | 
| 
		 After Width: | Height: | Size: 1.7 KiB  | 
| 
		 After Width: | Height: | Size: 205 KiB  | 
| 
		 After Width: | Height: | Size: 2.2 KiB  | 
| 
		 After Width: | Height: | Size: 911 B  | 
| 
		 After Width: | Height: | Size: 1.1 KiB  | 
| 
		 After Width: | Height: | Size: 1.1 KiB  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 600 B  | 
| 
		 After Width: | Height: | Size: 673 B  | 
| 
		 After Width: | Height: | Size: 2.0 KiB  | 
| 
		 After Width: | Height: | Size: 462 B  | 
| 
		 After Width: | Height: | Size: 2.1 KiB  | 
| 
		 After Width: | Height: | Size: 926 B  | 
| 
		 After Width: | Height: | Size: 9.0 KiB  | 
| 
		 After Width: | Height: | Size: 23 KiB  | 
| 
		 After Width: | Height: | Size: 7.0 KiB  | 
| 
		 After Width: | Height: | Size: 11 KiB  | 
| 
		 After Width: | Height: | Size: 878 B  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 653 B  | 
| 
		 After Width: | Height: | Size: 800 B  | 
| 
		 After Width: | Height: | Size: 905 B  | 
| 
		 After Width: | Height: | Size: 189 KiB  | 
| 
		 After Width: | Height: | Size: 4.3 KiB  | 
| 
		 After Width: | Height: | Size: 839 B  | 
| 
		 After Width: | Height: | Size: 1.7 KiB  | 
| 
		 After Width: | Height: | Size: 5.9 KiB  | 
| 
		 After Width: | Height: | Size: 1.6 KiB  | 
| 
		 After Width: | Height: | Size: 34 KiB  | 
| 
		 After Width: | Height: | Size: 26 KiB  | 
| 
		 After Width: | Height: | Size: 3.8 KiB  | 
| 
		 After Width: | Height: | Size: 23 KiB  | 
| 
		 After Width: | Height: | Size: 1.9 KiB  | 
| 
		 After Width: | Height: | Size: 2.3 KiB  | 
| 
		 After Width: | Height: | Size: 427 B  | 
| 
		 After Width: | Height: | Size: 627 B  | 
| 
		 After Width: | Height: | Size: 1.1 KiB  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 988 B  | 
| 
		 After Width: | Height: | Size: 3.7 KiB  | 
| 
		 After Width: | Height: | Size: 5.0 KiB  | 
| 
		 After Width: | Height: | Size: 875 B  | 
| 
		 After Width: | Height: | Size: 1.2 KiB  | 
| 
		 After Width: | Height: | Size: 80 KiB  | 
| 
		 After Width: | Height: | Size: 3.2 KiB  | 
| 
		 After Width: | Height: | Size: 565 B  | 
| 
		 After Width: | Height: | Size: 26 KiB  | 
| 
		 After Width: | Height: | Size: 43 KiB  | 
| 
		 After Width: | Height: | Size: 1.4 KiB  | 
| 
		 After Width: | Height: | Size: 4.0 KiB  | 
| 
		 After Width: | Height: | Size: 38 KiB  | 
| 
		 After Width: | Height: | Size: 4.3 KiB  | 
| 
		 After Width: | Height: | Size: 912 KiB  | 
| 
		 After Width: | Height: | Size: 87 KiB  | 
| 
		 After Width: | Height: | Size: 46 KiB  | 
| 
		 After Width: | Height: | Size: 1.3 MiB  | 
| 
		 After Width: | Height: | Size: 85 KiB  | 
| 
		 After Width: | Height: | Size: 80 KiB  | 
| 
		 After Width: | Height: | Size: 95 KiB  | 
| 
		 After Width: | Height: | Size: 46 KiB  | 
| 
		 After Width: | Height: | Size: 78 KiB  |