| @ -0,0 +1,48 @@ | |||
| .. image:: https://img.shields.io/badge/license-LGPL--3-green.svg | |||
|     :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html | |||
|     :alt: License: LGPL-3 | |||
| 
 | |||
| HR Holiday Generator | |||
| ==================== | |||
| * This module allow to generate public holidays of selected country | |||
| 
 | |||
| Configuration | |||
| ============= | |||
|     - www.odoo.com/documentation/16.0/setup/install.html | |||
|     - Install our custom addon | |||
| 
 | |||
| License | |||
| ------- | |||
| General Public License, Version 3 (LGPL v3). | |||
| 
 | |||
| (https://www.gnu.org/licenses/lgpl-3.0-standalone.html) | |||
| 
 | |||
| Company | |||
| ------- | |||
| * `Cybrosys Techno Solutions <https://cybrosys.com/>`__ | |||
| 
 | |||
| Credits | |||
| ------- | |||
| Developer: (V16) Anusha C ,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 https://www.cybrosys.com | |||
| 
 | |||
| Further information | |||
| =================== | |||
| HTML Description: `<static/description/index.html>`__ | |||
| @ -0,0 +1,23 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #  Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #  Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #  Author: Anusha C (odoo@cybrosys.com) | |||
| # | |||
| #  You can modify it under the terms of the GNU LESSER | |||
| #  GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #  You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #  (LGPL v3) along with this program. | |||
| #  If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| from . import models | |||
| from . import wizard | |||
| @ -0,0 +1,48 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #  Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #  Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #  Author: Anusha C (odoo@cybrosys.com) | |||
| # | |||
| #  You can modify it under the terms of the GNU LESSER | |||
| #  GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #  You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #  (LGPL v3) along with this program. | |||
| #  If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| { | |||
|     "name": "HR Holiday Generator", | |||
|     "version": "16.0.1.0.0", | |||
|     "category": 'Human Resources', | |||
|     "summary": """Generate public holidays based on selected criteria.""", | |||
|     "description": """This module allows you to generate public holidays based  | |||
|     on selected criteria such as year, month, or a specific date.It provides a  | |||
|     wizard that communicates with an external API to fetch public holiday data  | |||
|     and create corresponding calendar leaves.You can customize the criteria and  | |||
|     view the generated holidays within the wizard itself.""", | |||
|     "author": "Cybrosys Techno Solutions", | |||
|     'company': 'Cybrosys Techno Solutions', | |||
|     'maintainer': 'Cybrosys Techno Solutions', | |||
|     'website': 'https://www.cybrosys.com', | |||
|     "depends": ["hr_holidays"], | |||
|     "data": ["security/ir.model.access.csv", | |||
|              "views/res_config_settings_views.xml", | |||
|              "views/holiday_log_views.xml", | |||
|              "wizard/overlapping_date_views.xml", | |||
|              "wizard/hr_holiday_generator_views.xml", | |||
|              "wizard/calendar_leave_generator_views.xml"], | |||
|     'images': ['static/description/banner.jpg'], | |||
|     'license': 'LGPL-3', | |||
|     'installable': True, | |||
|     'auto_install': False, | |||
|     'application': False, | |||
| } | |||
| @ -0,0 +1,6 @@ | |||
| ## Module <hr_holiday_generator> | |||
| #### 31.10.2023 | |||
| #### Version 16.0.1.0.0 | |||
| ##### ADD | |||
| 
 | |||
| - Initial Commit for HR Holiday Generator | |||
| @ -0,0 +1,23 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #  Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #  Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #  Author: Anusha C (odoo@cybrosys.com) | |||
| # | |||
| #  You can modify it under the terms of the GNU LESSER | |||
| #  GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #  You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #  (LGPL v3) along with this program. | |||
| #  If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| from . import holiday_log | |||
| from . import res_config_settings | |||
| @ -0,0 +1,36 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #  Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #  Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #  Author: Anusha C (odoo@cybrosys.com) | |||
| # | |||
| #  You can modify it under the terms of the GNU LESSER | |||
| #  GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #  You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #  (LGPL v3) along with this program. | |||
| #  If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| from odoo import fields, models | |||
| 
 | |||
| 
 | |||
| class HolidayLog(models.Model): | |||
|     """The model is for showing the holiday logs""" | |||
|     _name = "holiday.log" | |||
|     _description = "Holiday Logs" | |||
| 
 | |||
|     name = fields.Char(string="Name", help="name of the public holiday") | |||
|     start_date = fields.Datetime(string="Start Date", | |||
|                                  help="Start date of the public holiday") | |||
|     end_date = fields.Datetime(string="End Date", | |||
|                                help="End date of the public holiday") | |||
|     description = fields.Char(string="Description", | |||
|                               help="Description of the public holiday") | |||
| @ -0,0 +1,36 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #  Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #  Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #  Author: Anusha C (odoo@cybrosys.com) | |||
| # | |||
| #  You can modify it under the terms of the GNU LESSER | |||
| #  GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #  You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #  (LGPL v3) along with this program. | |||
| #  If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| from odoo import fields, models | |||
| 
 | |||
| 
 | |||
| class ResConfigSettings(models.TransientModel): | |||
|     """This model is to add an api key and boolean field in the settings""" | |||
|     _inherit = "res.config.settings" | |||
| 
 | |||
|     holiday_api = fields.Boolean( | |||
|         string="Holiday Api", | |||
|         config_parameter='hr_holiday_generator.holiday_api', | |||
|         help="A boolean to show and hide the api key field.") | |||
|     holiday_api_key = fields.Char( | |||
|         string="Api Key", | |||
|         config_parameter='hr_holiday_generator.holiday_api_key', | |||
|         help="Please enter the calendarific API key here.") | |||
| 
 | 
| After Width: | Height: | Size: 3.6 KiB | 
| After Width: | Height: | Size: 310 B | 
| After Width: | Height: | Size: 1.3 KiB | 
| After Width: | Height: | Size: 1.4 KiB | 
| After Width: | Height: | Size: 576 B | 
| After Width: | Height: | Size: 733 B | 
| After Width: | Height: | Size: 911 B | 
| After Width: | Height: | Size: 1.1 KiB | 
| After Width: | Height: | Size: 1.2 KiB | 
| After Width: | Height: | Size: 673 B | 
| After Width: | Height: | Size: 878 B | 
| After Width: | Height: | Size: 653 B | 
| After Width: | Height: | Size: 905 B | 
| After Width: | Height: | Size: 839 B | 
| After Width: | Height: | Size: 427 B | 
| After Width: | Height: | Size: 627 B | 
| After Width: | Height: | Size: 1.2 KiB | 
| After Width: | Height: | Size: 988 B | 
| After Width: | Height: | Size: 1.2 KiB | 
| After Width: | Height: | Size: 1.5 KiB | 
| After Width: | Height: | Size: 1.1 KiB | 
| After Width: | Height: | Size: 1.9 KiB | 
| After Width: | Height: | Size: 1.1 KiB | 
| After Width: | Height: | Size: 2.1 KiB | 
| After Width: | Height: | Size: 4.4 KiB | 
| After Width: | Height: | Size: 589 B | 
| After Width: | Height: | Size: 3.4 KiB | 
| After Width: | Height: | Size: 1.7 KiB | 
| After Width: | Height: | Size: 2.3 KiB | 
| After Width: | Height: | Size: 967 B | 
| After Width: | Height: | Size: 1.6 KiB | 
| After Width: | Height: | Size: 3.8 KiB | 
| After Width: | Height: | Size: 5.0 KiB | 
| After Width: | Height: | Size: 82 KiB | 
| After Width: | Height: | Size: 82 KiB | 
| After Width: | Height: | Size: 85 KiB | 
| After Width: | Height: | Size: 81 KiB | 
| After Width: | Height: | Size: 80 KiB | 
| After Width: | Height: | Size: 84 KiB | 
| After Width: | Height: | Size: 404 KiB | 
| After Width: | Height: | Size: 106 KiB | 
| After Width: | Height: | Size: 80 KiB | 
| After Width: | Height: | Size: 208 KiB | 
| After Width: | Height: | Size: 215 KiB | 
| After Width: | Height: | Size: 178 KiB | 
| After Width: | Height: | Size: 73 KiB | 
| After Width: | Height: | Size: 182 KiB | 
| After Width: | Height: | Size: 295 KiB | 
| After Width: | Height: | Size: 78 KiB | 
| After Width: | Height: | Size: 243 KiB | 
| After Width: | Height: | Size: 78 KiB | 
| After Width: | Height: | Size: 94 KiB | 
| After Width: | Height: | Size: 18 KiB | 
| @ -0,0 +1,708 @@ | |||
| <div style="background-color: #714B67; height: 810px; width: 100%; padding: 15px; position: relative;"> | |||
|     <!-- TITLE BAR --> | |||
|     <div class="d-flex align-items-center justify-content-between" | |||
|          style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;"> | |||
|         <img src="assets/misc/cybrosys-logo.png" width="42" height="42" | |||
|              style="width: 42px; height: 42px;"/> | |||
|         <div> | |||
|             <div | |||
|                     style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" | |||
|                     class="mr-2"> | |||
|                 <i class="fa fa-check mr-1"></i>Community | |||
|             </div> | |||
|             <div | |||
|                     style="color: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" | |||
|                     class="mr-2"> | |||
|                 <i class="fa fa-check mr-1"></i>Enterprise | |||
|             </div> | |||
|             <div | |||
|                     style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;" | |||
|                     class="mr-2"> | |||
|                 <i class="fa fa-check mr-1"></i>Odoo.sh | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
|     <!-- END OF TITLE BAR --> | |||
|     <div class="container"> | |||
|         <div class="row"> | |||
|             <div class="col-sm-12 col-md-12 col-lg-12"> | |||
|                 <!-- APP HERO --> | |||
|                 <h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;"> | |||
|                     HR Holiday Generator</h1> | |||
|                 <p | |||
|                         style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;"> | |||
|                     Generate Public Holidays Based On Selected Criteria.</p> | |||
|                 <!-- END OF APP HERO --> | |||
|                 <img src="assets/screenshots/hero.gif" class="img-responsive" | |||
|                      style="width: 100%; margin-left: auto; margin-right: auto;"/> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <!-- NAVIGATION SECTION --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/compass.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Explore This | |||
|         Module</h2> | |||
| </div> | |||
| <div class="row my-4" style="font-family: 'Montserrat', sans-serif;"> | |||
|     <div class="col-sm-12 col-md-6 my-3"> | |||
|         <a href="#overview"> | |||
|             <div class="d-flex justify-content-between align-items-center" | |||
|                  style="background-color: #f5f5f5; padding: 30px; width: 100%;"> | |||
|                 <div> | |||
|                     <span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span> | |||
|                     <span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33;  display: block;">Learn | |||
|             more about this | |||
|             module</span> | |||
|                 </div> | |||
|                 <img src="assets/misc/right-arrow.png" width="36" height="36"/> | |||
|             </div> | |||
|         </a> | |||
|     </div> | |||
|     <div class="col-sm-12 col-md-6 my-3"> | |||
|         <a href="#features"> | |||
|             <div class="d-flex justify-content-between align-items-center" | |||
|                  style="background-color: #f5f5f5; padding: 30px; width: 100%;"> | |||
|                 <div> | |||
|                     <span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span> | |||
|                     <span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33;  display: block;">View | |||
|             features of this | |||
|             module</span> | |||
|                 </div> | |||
|                 <img src="assets/misc/right-arrow.png" width="36" height="36"/> | |||
|             </div> | |||
|         </a> | |||
|     </div> | |||
|     <div class="col-sm-12 col-md-6 my-3"> | |||
|         <a href="#screenshots"> | |||
|             <div class="d-flex justify-content-between align-items-center" | |||
|                  style="background-color: #f5f5f5; padding: 30px; width: 100%;"> | |||
|                 <div> | |||
|                     <span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span> | |||
|                     <span style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33;  display: block;">View | |||
|             screenshots for this | |||
|             module</span> | |||
|                 </div> | |||
|                 <img src="assets/misc/right-arrow.png" width="36" height="36"/> | |||
|             </div> | |||
|         </a> | |||
|     </div> | |||
| </div> | |||
| <!-- END OF NAVIGATION SECTION --> | |||
| 
 | |||
| <!-- OVERVIEW SECTION --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="overview"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/pie-chart.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Overview | |||
|     </h2> | |||
| </div> | |||
| <div class="row" | |||
|      style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> | |||
|     <div class="col-sm-12 py-4"> | |||
|         This module helps user to create Public Holidays based on selected | |||
|         criteria. | |||
|     </div> | |||
| </div> | |||
| <!-- END OF OVERVIEW SECTION --> | |||
| 
 | |||
| <!-- FEATURES SECTION --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="features"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/features.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Features | |||
|     </h2> | |||
| </div> | |||
| <div class="row" | |||
|      style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;"> | |||
|     <div class="col-sm-12 col-md-6"> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 40px; margin-bottom: 40px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Community & | |||
|         Enterprise Support.</span> | |||
|         </div> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span | |||
|                     style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> Automatic Public Holidays Generation.</span> | |||
|         </div> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span | |||
|                     style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> Fetch public holiday data via external API for accuracy.</span> | |||
|         </div> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span | |||
|                     style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Easily select Year, Month, or Date criteria for holiday generation.</span> | |||
|         </div> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span | |||
|                     style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Automatically convert holiday dates to user's local time zone.</span> | |||
|         </div> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span | |||
|                     style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Seamlessly generate calendar leaves for public holidays, enhancing leave management.</span> | |||
|         </div> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span | |||
|                     style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Detect overlapping dates, alerting users to prevent duplicate holiday records.</span> | |||
|         </div> | |||
|         <div class="d-flex align-items-center" | |||
|              style="margin-top: 30px; margin-bottom: 30px"> | |||
|             <img src="assets/misc/check-box.png" class="mr-2"/> | |||
|             <span | |||
|                     style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Maintain a log of overlapping holiday dates for effective conflict resolution and future reference.</span> | |||
|         </div> | |||
|     </div> | |||
| 
 | |||
| </div> | |||
| <!-- END OF FEATURES SECTION --> | |||
| 
 | |||
| <!-- SCREENSHOTS SECTION --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;" | |||
|      id="screenshots"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/pictures.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Screenshots | |||
|     </h2> | |||
| </div> | |||
| <div class="row"> | |||
|     <div class="col-sm-12"> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Create an account in <a href="https://calendarific.com">Calendarific</a> | |||
|                 site. Select the plan. Copy the generated API key. | |||
|             </h3> | |||
|             <p>Account Dashboard --> Home </p> | |||
|             <img src="assets/screenshots/screenshot0.png" | |||
|                  class="img-thumbnail"> | |||
|         </div> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Add your API key from the Calendarific site in the general | |||
|                 settings for data retrieval. | |||
|             </h3> | |||
|             <img src="assets/screenshots/screenshot1.png" | |||
|                  class="img-thumbnail"> | |||
|         </div> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Click on the 'GENERATE' button to Initiate fetching and creation | |||
|                 of Public Holidays based on selected criteria. | |||
|             </h3> | |||
|             <p>Time Off --> Configuration --> Holiday Generator</p> | |||
|             <img src="assets/screenshots/screenshot2.png" | |||
|                  class="img-thumbnail"> | |||
|         </div> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Click on the 'SAVE' button to store generated Public Holidays | |||
|                 records in the system. </h3> | |||
|             <img src="assets/screenshots/screenshot3.png" | |||
|                  class="img-thumbnail"> | |||
|         </div> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 The screenshot provides a visual overview of the newly generated | |||
|                 Public Holidays.</h3> | |||
|             <img src="assets/screenshots/screenshot4.png" | |||
|                  class="img-thumbnail"> | |||
|         </div> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 When overlapping dates are entered, the module identifies | |||
|                 conflicts and issues a warning when the SAVE button is | |||
|                 clicked.</h3> | |||
|             <img src="assets/screenshots/screenshot5.png" | |||
|                  class="img-thumbnail"> | |||
|         </div> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 The screenshot provides a visual overview of the warning upon | |||
|                 entering overlapping dates.</h3> | |||
|             <img src="assets/screenshots/screenshot6.png" | |||
|                  class="img-thumbnail"> | |||
|         </div> | |||
| 
 | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Records overlapping dates in the Holiday Logs for reference.</h3> | |||
|             <p>Time Off --> Configuration --> Holiday Logs</p> | |||
|             <img src="assets/screenshots/screenshot7.png" | |||
|                  class="img-thumbnail"> | |||
|         </div> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 When holidays of same date are entered, the module identifies | |||
|                 conflicts and issues a warning when the SAVE button is | |||
|                 clicked.</h3> | |||
|             <img src="assets/screenshots/screenshot8.png" | |||
|                  class="img-thumbnail"> | |||
|         </div> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 The screenshot provides a visual overview of the warning upon | |||
|                 entering holidays of same date. Click on CONTINUE button to | |||
|                 continue the process.</h3> | |||
|             <img src="assets/screenshots/screenshot9.png" | |||
|                  class="img-thumbnail"> | |||
|         </div> | |||
|         <div style="display: block; margin: 30px auto;"> | |||
|             <h3 style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;"> | |||
|                 Holidays of same dates can be seen in red colour , select one | |||
|                 holiday among the same dates and click on the SAVE button to | |||
|                 generate Public Holidays in Odoo.</h3> | |||
|             <img src="assets/screenshots/screenshot10.png" | |||
|                  class="img-thumbnail"> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <!-- END OF SCREENSHOTS SECTION --> | |||
| 
 | |||
| <!-- RELATED PRODUCTS --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/categories.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Related | |||
|         Products | |||
|     </h2> | |||
| </div> | |||
| <div class="row"> | |||
|     <div class="col-sm-12"> | |||
|         <div id="demo1" class="row carousel slide" data-ride="carousel"> | |||
|             <!-- The slideshow --> | |||
|             <div class="carousel-inner" style="padding: 30px;"> | |||
|                 <div class="carousel-item" style="min-height: 198.656px;"> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/employee_documents_expiry/#" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/1.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/automatic_payroll/#" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/2.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/hr_payroll_account_community/" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/3.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                 </div> | |||
|                 <div class="carousel-item active" | |||
|                      style="min-height: 198.656px;"> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/hr_payroll_community/#" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/4.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/timesheets_by_employee/#" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/5.png"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                     <div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16" | |||
|                          style="float:left"> | |||
|                         <a href="https://apps.odoo.com/apps/modules/16.0/employee_check_list/" | |||
|                            target="_blank"> | |||
|                             <div style="border-radius:10px"> | |||
|                                 <img class="img img-responsive center-block" | |||
|                                      style="border-radius: 0px;" | |||
|                                      src="assets/modules/6.gif"> | |||
|                             </div> | |||
|                         </a> | |||
|                     </div> | |||
|                 </div> | |||
|             </div> | |||
|             <!-- Left and right controls --> | |||
|             <a class="carousel-control-prev" href="#demo1" data-slide="prev" | |||
|                style="width:35px; color:#000"> <span | |||
|                     class="carousel-control-prev-icon"><i | |||
|                     class="fa fa-chevron-left" | |||
|                     style="font-size:24px"></i></span> | |||
|             </a> <a class="carousel-control-next" href="#demo1" | |||
|                     data-slide="next" style="width:35px; color:#000"> | |||
|             <span class="carousel-control-next-icon"><i | |||
|                     class="fa fa-chevron-right" | |||
|                     style="font-size:24px"></i></span> | |||
|         </a> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <!-- END OF RELATED PRODUCTS --> | |||
| 
 | |||
| <!-- OUR SERVICES --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/star.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Our Services | |||
|     </h2> | |||
| </div> | |||
| <div class="container my-5"> | |||
|     <div class="row"> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/cogs.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Customization</h6> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/wrench.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Implementation</h6> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/lifebuoy.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Support</h6> | |||
|         </div> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/user.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Hire | |||
|                 Odoo | |||
|                 Developer</h6> | |||
|         </div> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #54a0ff  !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/puzzle.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Integration</h6> | |||
|         </div> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/update.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Migration</h6> | |||
|         </div> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/consultation.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Consultancy</h6> | |||
|         </div> | |||
| 
 | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/training.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Implementation</h6> | |||
|         </div> | |||
|         <div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4"> | |||
|             <div class="d-flex justify-content-center align-items-center mx-3 my-3" | |||
|                  style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;"> | |||
|                 <img src="assets/icons/license.png" class="img-responsive" | |||
|                      height="48px" width="48px"> | |||
|             </div> | |||
|             <h6 class="text-center" | |||
|                 style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;"> | |||
|                 Odoo | |||
|                 Licensing Consultancy</h6> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <!-- END OF OUR SERVICES --> | |||
| 
 | |||
| <!-- OUR INDUSTRIES --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/corporate.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Our | |||
|         Industries | |||
|     </h2> | |||
| </div> | |||
| <div class="container my-5"> | |||
|     <div class="row"> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/trading-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Trading | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Easily procure | |||
|                     and | |||
|                     sell your products</p> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/pos-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     POS | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Easy | |||
|                     configuration | |||
|                     and convivial experience</p> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/education-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Education | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     A platform for | |||
|                     educational management</p> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/manufacturing-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Manufacturing | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Plan, track and | |||
|                     schedule your operations</p> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/ecom-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     E-commerce & Website | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Mobile | |||
|                     friendly, | |||
|                     awe-inspiring product pages</p> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/service-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Service Management | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Keep track of | |||
|                     services and invoice</p> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/restaurant-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Restaurant | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     Run your bar or | |||
|                     restaurant methodically</p> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-lg-3"> | |||
|             <div class="my-4 d-flex flex-column justify-content-center" | |||
|                  style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;"> | |||
|                 <img src="assets/icons/hotel-black.png" | |||
|                      class="img-responsive mb-3" height="48px" width="48px"> | |||
|                 <h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;"> | |||
|                     Hotel Management | |||
|                 </h5> | |||
|                 <p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;"> | |||
|                     An | |||
|                     all-inclusive | |||
|                     hotel management application</p> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <!-- END OF OUR INDUSTRIES --> | |||
| 
 | |||
| <!-- SUPPORT --> | |||
| <div class="d-flex align-items-center" | |||
|      style="border-bottom: 2px solid #714B67; padding: 15px 0px;"> | |||
|     <div class="d-flex justify-content-center align-items-center mr-2" | |||
|          style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;"> | |||
|         <img src="assets/misc/customer-support.png"/> | |||
|     </div> | |||
|     <h2 class="mt-2" | |||
|         style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;"> | |||
|         Support | |||
|     </h2> | |||
| </div> | |||
| <div class="container mt-5"> | |||
|     <div class="row"> | |||
|         <div class="col-sm-12 col-md-6"> | |||
|             <div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> | |||
|                 <div class="mr-4 d-flex justify-content-center align-items-center" | |||
|                      style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> | |||
|                     <img src="assets/misc/support.png" height="48" width="48" | |||
|                          style="width: 42px; height: 42px;"/> | |||
|                 </div> | |||
|                 <div> | |||
|                     <h4>Need Help?</h4> | |||
|                     <p style="line-height: 100%;">Got questions or need help? | |||
|                         Get in touch.</p> | |||
|                     <a href="mailto:odoo@cybrosys.com"> | |||
|                         <p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> | |||
|                             odoo@cybrosys.com</p> | |||
|                     </a> | |||
|                 </div> | |||
|             </div> | |||
|         </div> | |||
|         <div class="col-sm-12 col-md-6"> | |||
|             <div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;"> | |||
|                 <div class="mr-4 d-flex justify-content-center align-items-center" | |||
|                      style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;"> | |||
|                     <img src="assets/misc/whatsapp.png" height="52" width="52" | |||
|                          style="width: 52px; height: 52px;"/> | |||
|                 </div> | |||
|                 <div> | |||
|                     <h4>WhatsApp</h4> | |||
|                     <p style="line-height: 100%;">Say hi to us on WhatsApp!</p> | |||
|                     <a href="https://api.whatsapp.com/send?phone=918606827707"> | |||
|                         <p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;"> | |||
|                             +91 86068 | |||
|                             27707</p> | |||
|                     </a> | |||
|                 </div> | |||
|             </div> | |||
|         </div> | |||
|     </div> | |||
|     <div class="row"> | |||
|         <div class="col-sm-12 my-5 d-flex justify-content-center align-items-center"> | |||
|             <img src="assets/misc/logo.png" width="144" height="31" | |||
|                  style="width:144px; height: 31px; margin-top: 40px;"/> | |||
|         </div> | |||
|     </div> | |||
| </div> | |||
| <!-- END OF SUPPORT --> | |||
| @ -0,0 +1,49 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <odoo> | |||
|     <!--    Tree view of the model holiday log--> | |||
|     <record id="holiday_log_view_tree" model="ir.ui.view"> | |||
|         <field name="name">holiday.log.view.tree</field> | |||
|         <field name="model">holiday.log</field> | |||
|         <field name="arch" type="xml"> | |||
|             <tree> | |||
|                 <field name="name"/> | |||
|                 <field name="start_date"/> | |||
|                 <field name="end_date"/> | |||
|                 <field name="description"/> | |||
|             </tree> | |||
|         </field> | |||
|     </record> | |||
|     <!--    Form view of the model holiday log--> | |||
|     <record id="holiday_log_view_form" model="ir.ui.view"> | |||
|         <field name="name">holiday.log.view.form</field> | |||
|         <field name="model">holiday.log</field> | |||
|         <field name="arch" type="xml"> | |||
|             <form> | |||
|                 <sheet> | |||
|                     <group> | |||
|                         <group> | |||
|                             <field name="name"/> | |||
|                             <field name="start_date"/> | |||
|                         </group> | |||
|                         <group> | |||
|                             <field name="end_date"/> | |||
|                             <field name="description"/> | |||
|                         </group> | |||
|                     </group> | |||
|                 </sheet> | |||
|             </form> | |||
|         </field> | |||
|     </record> | |||
| <!--    Action of the views--> | |||
|     <record id="holiday_log_action" model="ir.actions.act_window"> | |||
|         <field name="name">Holiday Logs</field> | |||
|         <field name="res_model">holiday.log</field> | |||
|         <field name="view_mode">tree,form</field> | |||
|     </record> | |||
| <!--    Adding menu--> | |||
|     <menuitem id="holiday_log_menu" | |||
|               name="Holiday Logs" | |||
|               parent="hr_holidays.menu_hr_holidays_configuration" | |||
|               action="holiday_log_action" | |||
|               sequence="11"/> | |||
| </odoo> | |||
| @ -0,0 +1,48 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <odoo> | |||
|     <!--    Inheriting settings and adding the new field inside the general settings--> | |||
|     <record id="res_config_settings_view_form" model="ir.ui.view"> | |||
|         <field name="name"> | |||
|             res.config.settings.view.form.inherit.hr.holiday.generator | |||
|         </field> | |||
|         <field name="model">res.config.settings</field> | |||
|         <field name="inherit_id" | |||
|                ref="base_setup.res_config_settings_view_form"/> | |||
|         <field name="arch" type="xml"> | |||
|             <xpath expr="//div[@id = 'invite_users']" | |||
|                    position="after"> | |||
|                 <div id="timeoff"> | |||
|                     <h2>Time off</h2> | |||
|                     <div class="row mt16 o_settings_container" | |||
|                          name="timeoff_setting_container"> | |||
|                         <div class="col-12 col-lg-12 o_setting_box" | |||
|                              id="timeoff_setting"> | |||
|                             <div class="col-12 col-lg-12 o_setting_box" | |||
|                                  id="holiday_generator_api_key"> | |||
|                                 <div class="o_setting_left_pane"> | |||
|                                     <field name="holiday_api"/> | |||
|                                 </div> | |||
|                                 <div class="o_setting_right_pane" | |||
|                                      id="timeoff_holiday_settings"> | |||
|                                     <label string="Public Holiday" | |||
|                                            for="holiday_api"/> | |||
|                                     <div class="text-muted"> | |||
|                                         Public Holidays | |||
|                                     </div> | |||
|                                     <div class="content-group"> | |||
|                                         <div class="content-group mt16" | |||
|                                              attrs="{'invisible':[('holiday_api','!=',True)]}"> | |||
|                                             <label for="holiday_api_key" | |||
|                                                    class="o_form_label col-1 col-lg-1 o_light_label"/> | |||
|                                             <field name="holiday_api_key" password="1"/> | |||
|                                         </div> | |||
|                                     </div> | |||
|                                 </div> | |||
|                             </div> | |||
|                         </div> | |||
|                     </div> | |||
|                 </div> | |||
|             </xpath> | |||
|         </field> | |||
|     </record> | |||
| </odoo> | |||
| @ -0,0 +1,25 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #  Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #  Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #  Author: Anusha C (odoo@cybrosys.com) | |||
| # | |||
| #  You can modify it under the terms of the GNU LESSER | |||
| #  GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #  You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #  (LGPL v3) along with this program. | |||
| #  If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| from . import calendar_leave | |||
| from . import calendar_leave_generator | |||
| from . import hr_holiday_generator | |||
| from . import overlapping_date | |||
| @ -0,0 +1,59 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #  Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #  Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #  Author: Anusha C (odoo@cybrosys.com) | |||
| # | |||
| #  You can modify it under the terms of the GNU LESSER | |||
| #  GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #  You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #  (LGPL v3) along with this program. | |||
| #  If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| from odoo import api, fields, models | |||
| 
 | |||
| 
 | |||
| class CalendarLeave(models.TransientModel): | |||
|     """Transient model for showing the values in hr holiday generator wizard""" | |||
|     _name = 'calendar.leave' | |||
|     _description = 'Calendar Leave' | |||
| 
 | |||
|     holiday_generator_id = fields.Many2one('hr.holiday.generator', | |||
|                                            string='Holiday Generator', | |||
|                                            help="A Many2one field to connect to" | |||
|                                                 "the model hr_holiday_generator" | |||
|                                            ) | |||
|     name = fields.Char(string="Name", help="name of the public holiday") | |||
|     start_date = fields.Datetime(string="Start Date", | |||
|                                  help="Start date of the public holiday") | |||
|     end_date = fields.Datetime(string="End Date", | |||
|                                help="End date of the public holiday") | |||
|     description = fields.Char(string="Description", | |||
|                               help="Description of the public holiday") | |||
|     warning = fields.Boolean(string="Warning", | |||
|                              help="Warning to show holidays of same dates", | |||
|                              compute="compute_warning", default=False) | |||
|     calendar_leave_generator_id = fields.Many2one( | |||
|         "calendar.leave.generator", | |||
|         string="Calendar leave generator", | |||
|         help="For connecting with calendar leave generator") | |||
| 
 | |||
|     @api.depends('start_date') | |||
|     def compute_warning(self): | |||
|         """Compute function for the boolean warning""" | |||
|         for record in self: | |||
|             same_date_records = self.filtered( | |||
|                 lambda dates: dates.start_date == record.start_date and | |||
|                 dates.id != record.id) | |||
|             for dates in same_date_records: | |||
|                 dates.warning = True | |||
|             record.warning = bool(same_date_records) | |||
| @ -0,0 +1,106 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #  Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #  Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #  Author: Anusha C (odoo@cybrosys.com) | |||
| # | |||
| #  You can modify it under the terms of the GNU LESSER | |||
| #  GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #  You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #  (LGPL v3) along with this program. | |||
| #  If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| from odoo import fields, models | |||
| 
 | |||
| 
 | |||
| class CalendarLeaveGenerator(models.TransientModel): | |||
|     """Transient model for showing repeated calendar leaves""" | |||
|     _name = 'calendar.leave.generator' | |||
|     _description = 'Calendar Leave Generator' | |||
| 
 | |||
|     calendar_leave_ids = fields.One2many('calendar.leave', | |||
|                                          'calendar_leave_generator_id', | |||
|                                          string='Calender Leave', | |||
|                                          help="A One2many field to connect to" | |||
|                                               "the model calender leave") | |||
| 
 | |||
|     def action_generate(self): | |||
|         """Function for generating public holidays or showing the warning""" | |||
|         existing_holiday = self.env['resource.calendar.leaves'].search([ | |||
|             ('resource_id', '=', False)]) | |||
|         overlapping_dates = [] | |||
|         overlapping_logs = [] | |||
|         new_holiday_dates = [] | |||
|         same_date_holidays = set() | |||
|         for existing in existing_holiday: | |||
|             for new_holiday in self.calendar_leave_ids: | |||
|                 if existing.date_from.date() == \ | |||
|                         new_holiday.start_date.date() or \ | |||
|                         existing.date_to.date() == new_holiday.end_date.date(): | |||
|                     overlapping_dates.append(new_holiday.start_date.date()) | |||
|                     overlapping_logs.append({ | |||
|                         'name': new_holiday.name, | |||
|                         'start_date': new_holiday.start_date, | |||
|                         'end_date': new_holiday.end_date, | |||
|                         'description': new_holiday.description | |||
|                     }) | |||
|                     break | |||
|         for new_holiday in self.calendar_leave_ids: | |||
|             new_date = new_holiday.start_date.date() | |||
|             if new_date in new_holiday_dates: | |||
|                 same_date_holidays.add(new_date) | |||
|             else: | |||
|                 new_holiday_dates.append(new_date) | |||
|         for log in overlapping_logs: | |||
|             existing_logs = self.env['holiday.log'].search([ | |||
|                 ('name', '=', log['name']), | |||
|                 ('start_date', '>=', log['start_date']), | |||
|                 ('end_date', '<=', log['end_date'])]) | |||
|             if not existing_logs: | |||
|                 self.env['holiday.log'].create(log) | |||
|         if overlapping_dates or same_date_holidays: | |||
|             warning_message = "" | |||
|             if overlapping_dates: | |||
|                 existing_dates = ", ".join( | |||
|                     date.strftime('%Y-%m-%d') for date in overlapping_dates) | |||
|                 warning_message += ( | |||
|                     f"Public holidays already exist for the following date(s): " | |||
|                     f"{existing_dates}.\nPlease refer to the logs for detailed " | |||
|                     f"information about the public holidays on these dates.\n\n" | |||
|                 ) | |||
|             if same_date_holidays: | |||
|                 warning_message += "Select only one holiday per date:\n" | |||
|                 warning_message += \ | |||
|                     "The following dates have multiple holidays:\n" | |||
|             for date in same_date_holidays: | |||
|                 warning_message += f"\n- {date.strftime('%Y-%m-%d')}" | |||
|             warning = self.env['overlapping.date'].create( | |||
|                 {'warning': warning_message}) | |||
|             return { | |||
|                 'name': 'Overlapping Dates Warning', | |||
|                 'type': 'ir.actions.act_window', | |||
|                 'res_model': 'overlapping.date', | |||
|                 'res_id': warning.id, | |||
|                 'view_mode': 'form', | |||
|                 'view_id': self.env.ref( | |||
|                     'hr_holiday_generator.overlapping_date_view_form').id, | |||
|                 'target': 'new', | |||
|                 'context': { | |||
|                     'active_calendar_leave_ids': self.calendar_leave_ids.ids | |||
|                 } | |||
|             } | |||
|         else: | |||
|             self.env['resource.calendar.leaves'].create([{ | |||
|                 'name': holiday.name, | |||
|                 'date_from': holiday.start_date, | |||
|                 'date_to': holiday.end_date | |||
|             } for holiday in self.calendar_leave_ids]) | |||
| @ -0,0 +1,31 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <odoo> | |||
|     <!--   Form view of the wizard model calendar leave generator --> | |||
|     <record id="calendar_leave_generator_view_form" model="ir.ui.view"> | |||
|         <field name="name">calendar.leave.generator.view.form</field> | |||
|         <field name="model">calendar.leave.generator</field> | |||
|         <field name="arch" type="xml"> | |||
|             <form> | |||
|                 <sheet> | |||
|                     <field name="calendar_leave_ids" nolabel="1"> | |||
|                         <tree decoration-danger="warning == True" create="0"> | |||
|                             <field name="name"/> | |||
|                             <field name="start_date"/> | |||
|                             <field name="end_date"/> | |||
|                             <field name="description"/> | |||
|                             <field name="warning" invisible="1"/> | |||
|                             <field name="holiday_generator_id" | |||
|                                    invisible="1"/> | |||
|                         </tree> | |||
|                     </field> | |||
|                     <footer> | |||
|                         <button name="action_generate" string="SAVE" type="object" | |||
|                                 class="btn-primary" data-hotkey="q"/> | |||
|                         <button string="Close" class="btn-secondary" | |||
|                                 special="cancel"/> | |||
|                     </footer> | |||
|                 </sheet> | |||
|             </form> | |||
|         </field> | |||
|     </record> | |||
| </odoo> | |||
| @ -0,0 +1,198 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #  Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #  Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #  Author: Anusha C (odoo@cybrosys.com) | |||
| # | |||
| #  You can modify it under the terms of the GNU LESSER | |||
| #  GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #  You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #  (LGPL v3) along with this program. | |||
| #  If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| import dateutil | |||
| import requests | |||
| from dateutil import parser | |||
| from odoo import fields, models | |||
| from odoo.exceptions import UserError | |||
| 
 | |||
| 
 | |||
| class HrHolidayGenerator(models.TransientModel): | |||
|     """This model is for creating a wizard and thus generating public holidays | |||
|     based on selected country.""" | |||
|     _name = 'hr.holiday.generator' | |||
|     _description = 'Hr Holiday Generator' | |||
| 
 | |||
|     country_id = fields.Many2one("res.country", string="Country", | |||
|                                  help="Select your country from here", | |||
|                                  required=True) | |||
|     generation_mode = fields.Selection( | |||
|         [('year', 'YEAR'), ('month', 'MONTH'), ('date', 'DATE')], | |||
|         string="Date/Month/Year", | |||
|         help="Select date or month or year in which you want to get the public " | |||
|              "holidays", required=True) | |||
|     date = fields.Date(string="Date", | |||
|                        default=lambda self: fields.Date.today(), | |||
|                        help="Select the date you want to generate the public " | |||
|                             "holiday") | |||
|     month = fields.Selection([('1', 'January'), | |||
|                               ('2', 'February'), | |||
|                               ('3', 'March'), | |||
|                               ('4', 'April'), | |||
|                               ('5', 'May'), | |||
|                               ('6', 'June'), | |||
|                               ('7', 'July'), | |||
|                               ('8', 'August'), | |||
|                               ('9', 'September'), | |||
|                               ('10', 'October'), | |||
|                               ('11', 'November'), | |||
|                               ('12', 'December')], string="Month", | |||
|                              help="Select the month you want to generate the " | |||
|                                   "public holiday", | |||
|                              default=str(fields.Date.today().month)) | |||
|     year = fields.Selection( | |||
|         selection='_get_years_selection', | |||
|         string="Year", | |||
|         help="Select the year you want to generate the public holiday", | |||
|         default=str(fields.Date.today().year)) | |||
|     calender_leaves_ids = fields.One2many('calendar.leave', | |||
|                                           'holiday_generator_id', | |||
|                                           string="Calender leaves", | |||
|                                           help="The One2many field to take the " | |||
|                                                "values of the model " | |||
|                                                "calender_leave") | |||
| 
 | |||
|     def _get_years_selection(self): | |||
|         """This function is for getting years to select in the field year""" | |||
|         year_list = [(str(record), str(record)) for record in | |||
|                      range(fields.datetime.now().year - 10, | |||
|                            fields.datetime.now().year + 10)] | |||
|         return year_list | |||
| 
 | |||
|     def action_generate(self): | |||
|         """This function is to set the action of button 'Generate'.""" | |||
|         self.calender_leaves_ids = False | |||
|         api_key = self.env['ir.config_parameter'].sudo().get_param( | |||
|             'hr_holiday_generator.holiday_api_key') or False | |||
|         if api_key: | |||
|             base_url = "https://calendarific.com/api/v2/holidays" | |||
|             url = (f"{base_url}?&api_key={api_key}&country=" | |||
|                    f"{self.country_id.code}") | |||
|             if self.generation_mode == 'year': | |||
|                 url += f"&year={self.year}" | |||
|             elif self.generation_mode == 'month': | |||
|                 url += f"&year={self.year}&month={self.month}" | |||
|             elif self.generation_mode == 'date': | |||
|                 url += (f"&year={self.date.year}&month={self.date.month}" | |||
|                         f"&day={self.date.day}") | |||
|             response = requests.get(url) | |||
|             if response.status_code == 200: | |||
|                 holidays_data = response.json() | |||
|                 calendar_leaves = [] | |||
|                 for holiday in holidays_data['response']['holidays']: | |||
|                     iso_datetime = holiday['date']['iso'] | |||
|                     holiday_date = dateutil.parser.parse(iso_datetime).date() | |||
|                     start_datetime = fields.datetime.combine(holiday_date, | |||
|                                                              fields.time.min) | |||
|                     end_datetime = fields.datetime.combine(holiday_date, | |||
|                                                            fields.time.max) | |||
|                     calendar_leaves.append(fields.Command.create({ | |||
|                         'holiday_generator_id': self.id, | |||
|                         'name': holiday['name'], | |||
|                         'start_date': start_datetime, | |||
|                         'end_date': end_datetime, | |||
|                         'description': holiday['description'] | |||
|                     })) | |||
|                 self.calender_leaves_ids = calendar_leaves | |||
|             return { | |||
|                 'type': 'ir.actions.act_window', | |||
|                 'res_model': 'hr.holiday.generator', | |||
|                 'res_id': self.id, | |||
|                 'view_mode': 'form', | |||
|                 'view_id': self.env.ref( | |||
|                     'hr_holiday_generator.hr_holiday_generator_view_form').id, | |||
|                 'target': 'new', | |||
|             } | |||
|         else: | |||
|             raise UserError( | |||
|                 "To retrieve the data, kindly provide the API key in the " | |||
|                 "general settings.") | |||
| 
 | |||
|     def action_save(self): | |||
|         """This function is to set the action of the button 'save'. """ | |||
|         existing_holiday = self.env['resource.calendar.leaves'].search([ | |||
|             ('resource_id', '=', False)]) | |||
|         overlapping_dates = [] | |||
|         overlapping_logs = [] | |||
|         new_holiday_dates = [] | |||
|         same_date_holidays = set() | |||
|         for existing in existing_holiday: | |||
|             for new_holiday in self.calender_leaves_ids: | |||
|                 if existing.date_from.date() == \ | |||
|                         new_holiday.start_date.date() or \ | |||
|                         existing.date_to.date() == new_holiday.end_date.date(): | |||
|                     overlapping_dates.append(new_holiday.start_date.date()) | |||
|                     overlapping_logs.append({ | |||
|                         'name': new_holiday.name, | |||
|                         'start_date': new_holiday.start_date, | |||
|                         'end_date': new_holiday.end_date, | |||
|                         'description': new_holiday.description | |||
|                     }) | |||
|                     break | |||
|         for new_holiday in self.calender_leaves_ids: | |||
|             new_date = new_holiday.start_date.date() | |||
|             if new_date in new_holiday_dates: | |||
|                 same_date_holidays.add(new_date) | |||
|             else: | |||
|                 new_holiday_dates.append(new_date) | |||
|         for log in overlapping_logs: | |||
|             existing_logs = self.env['holiday.log'].search([ | |||
|                 ('name', '=', log['name']), | |||
|                 ('start_date', '>=', log['start_date']), | |||
|                 ('end_date', '<=', log['end_date']) | |||
|             ]) | |||
|             if not existing_logs: | |||
|                 self.env['holiday.log'].create(log) | |||
|         if overlapping_dates or same_date_holidays: | |||
|             warning_message = "" | |||
|             if overlapping_dates: | |||
|                 existing_dates = ", ".join( | |||
|                     date.strftime('%Y-%m-%d') for date in overlapping_dates) | |||
|                 warning_message += ( | |||
|                     f"Public holidays already exist for the following date(s): " | |||
|                     f"{existing_dates}.\nPlease refer to the logs for detailed " | |||
|                     f"information about the public holidays on these dates.\n\n" | |||
|                 ) | |||
|             if same_date_holidays: | |||
|                 warning_message += "Select only one holiday per date:\n" | |||
|                 warning_message += \ | |||
|                     "The following dates have multiple holidays:\n" | |||
|             for date in same_date_holidays: | |||
|                 warning_message += f"\n- {date.strftime('%Y-%m-%d')}" | |||
|             warning = self.env['overlapping.date'].create( | |||
|                 {'warning': warning_message}) | |||
|             return { | |||
|                 'name': 'Overlapping Dates Warning', | |||
|                 'type': 'ir.actions.act_window', | |||
|                 'res_model': 'overlapping.date', | |||
|                 'res_id': warning.id, | |||
|                 'view_mode': 'form', | |||
|                 'view_id': self.env.ref( | |||
|                     'hr_holiday_generator.overlapping_date_view_form').id, | |||
|                 'target': 'new', | |||
|             } | |||
|         else: | |||
|             self.env['resource.calendar.leaves'].create([{ | |||
|                 'name': holiday.name, | |||
|                 'date_from': holiday.start_date, | |||
|                 'date_to': holiday.end_date | |||
|             } for holiday in self.calender_leaves_ids]) | |||
| @ -0,0 +1,66 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
| <odoo> | |||
|     <!--  Form view of the wizard model hr_holiday_generator--> | |||
|     <record id="hr_holiday_generator_view_form" model="ir.ui.view"> | |||
|         <field name="name">hr.holiday.generator.view.form</field> | |||
|         <field name="model">hr.holiday.generator</field> | |||
|         <field name="arch" type="xml"> | |||
|             <form> | |||
|                 <sheet> | |||
|                     <group> | |||
|                         <field name="country_id"/> | |||
|                         <field name="generation_mode" widget="radio"/> | |||
|                         <field name="date" | |||
|                                attrs="{'invisible':[('generation_mode','!=','date')]}"/> | |||
|                         <field name="month" | |||
|                                attrs="{'invisible':[('generation_mode','!=','month')]}"/> | |||
|                         <field name="year" | |||
|                                attrs="{'invisible':[('generation_mode','!=','year'), | |||
|                            ('generation_mode','!=','month')]}"/> | |||
|                         <button name="action_generate" | |||
|                                 string="Generate" | |||
|                                 type="object" | |||
|                                 data-hotkey="a" | |||
|                                 class="btn-primary"/> | |||
|                     </group> | |||
|                     <separator string="Generated Holidays" colspan="4"/> | |||
|                     <field name="calender_leaves_ids"> | |||
|                         <tree> | |||
|                             <field name="name"/> | |||
|                             <field name="start_date"/> | |||
|                             <field name="end_date"/> | |||
|                             <field name="description"/> | |||
|                         </tree> | |||
|                     </field> | |||
|                     <footer> | |||
|                         <button name="action_save" | |||
|                                 string="Save" | |||
|                                 type="object" | |||
|                                 data-hotkey="q" | |||
|                                 class="btn-primary"/> | |||
|                         <button string="Cancel" | |||
|                                 class="btn-secondary" | |||
|                                 special="cancel" data-hotkey="z"/> | |||
|                     </footer> | |||
|                 </sheet> | |||
|             </form> | |||
|         </field> | |||
|     </record> | |||
| 
 | |||
|     <!--  Action for the view--> | |||
|     <record id="hr_holiday_generator_action" | |||
|             model="ir.actions.act_window"> | |||
|         <field name="name">Hr Holiday Generator</field> | |||
|         <field name="type">ir.actions.act_window</field> | |||
|         <field name="res_model">hr.holiday.generator</field> | |||
|         <field name="view_mode">form</field> | |||
|         <field name="view_id" ref="hr_holiday_generator_view_form"/> | |||
|         <field name="target">new</field> | |||
|     </record> | |||
| <!--    Menu for the action--> | |||
|     <menuitem id="hr_holiday_generator_menu" | |||
|               name="Holiday Generator" | |||
|               action="hr_holiday_generator_action" | |||
|               parent="hr_holidays.menu_hr_holidays_configuration" | |||
|               sequence="10"/> | |||
| </odoo> | |||
| @ -0,0 +1,67 @@ | |||
| # -*- coding: utf-8 -*- | |||
| ############################################################################### | |||
| # | |||
| #  Cybrosys Technologies Pvt. Ltd. | |||
| # | |||
| #  Copyright (C) 2023-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |||
| #  Author: Anusha C (odoo@cybrosys.com) | |||
| # | |||
| #  You can modify it under the terms of the GNU LESSER | |||
| #  GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |||
| # | |||
| #  You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |||
| #  (LGPL v3) along with this program. | |||
| #  If not, see <http://www.gnu.org/licenses/>. | |||
| # | |||
| ############################################################################### | |||
| from odoo import fields, models | |||
| 
 | |||
| 
 | |||
| class OverlappingDate(models.TransientModel): | |||
|     """This transient model is to display as a warning in the model | |||
|     hr_holiday_generator""" | |||
|     _name = 'overlapping.date' | |||
|     _description = 'Wizard to Display Warning' | |||
| 
 | |||
|     warning = fields.Text(string='Warning', readonly=True, | |||
|                           help="For showing the warning messages.") | |||
| 
 | |||
|     def action_continue(self): | |||
|         """Function for redirecting into calendar leave generator wizard""" | |||
|         generator = self.env['hr.holiday.generator'].browse( | |||
|             self.env.context.get('active_id')) | |||
|         calendar_leaves = self.env['calendar.leave'].search([ | |||
|             ('holiday_generator_id', '=', generator.id)]) | |||
|         existing_public_holidays = self.env['resource.calendar.leaves'].search([ | |||
|             ('resource_id', '=', False)]) | |||
|         filtered_calendar_leaves = calendar_leaves.filtered( | |||
|             lambda cl: cl.start_date.date() not in [holiday.date_from.date() for | |||
|                                                     holiday in | |||
|                                                     existing_public_holidays]) | |||
|         if 'active_calendar_leave_ids' in self.env.context: | |||
|             filtered_calendar_leaves_ids = self.env.context[ | |||
|                 'active_calendar_leave_ids'] | |||
|             return { | |||
|                 'type': 'ir.actions.act_window', | |||
|                 'name': 'Calendar Leaves', | |||
|                 'res_model': 'calendar.leave.generator', | |||
|                 'view_mode': 'form', | |||
|                 'target': 'new', | |||
|                 'context': { | |||
|                     'default_calendar_leave_ids': filtered_calendar_leaves_ids} | |||
|             } | |||
|         elif filtered_calendar_leaves: | |||
|             return { | |||
|                 'type': 'ir.actions.act_window', | |||
|                 'name': 'Calendar Leaves', | |||
|                 'res_model': 'calendar.leave.generator', | |||
|                 'view_mode': 'form', | |||
|                 'target': 'new', | |||
|                 'context': { | |||
|                     'default_calendar_leave_ids': filtered_calendar_leaves.ids} | |||
|             } | |||
| @ -0,0 +1,23 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <odoo> | |||
|     <!--   Form view of the wizard model overlapping_date --> | |||
|     <record id="overlapping_date_view_form" model="ir.ui.view"> | |||
|         <field name="name">overlapping.date.view.form</field> | |||
|         <field name="model">overlapping.date</field> | |||
|         <field name="arch" type="xml"> | |||
|             <form> | |||
|                 <sheet> | |||
|                     <group> | |||
|                         <field name="warning" readonly="1" nolabel=""/> | |||
|                     </group> | |||
|                     <footer> | |||
|                         <button name="action_continue" string="CONTINUE" type="object" | |||
|                                 class="btn-primary" data-hotkey="q"/> | |||
|                         <button string="Close" class="btn-secondary" | |||
|                                 special="cancel"/> | |||
|                     </footer> | |||
|                 </sheet> | |||
|             </form> | |||
|         </field> | |||
|     </record> | |||
| </odoo> | |||