Browse Source

July 4: [ADD] Initial commit 'hr_holiday_generator'

pull/254/merge
RisvanaCybro 10 months ago
parent
commit
659d7a7216
  1. 49
      hr_holiday_generator/README.rst
  2. 23
      hr_holiday_generator/__init__.py
  3. 48
      hr_holiday_generator/__manifest__.py
  4. 6
      hr_holiday_generator/doc/RELEASE_NOTES.md
  5. 23
      hr_holiday_generator/models/__init__.py
  6. 36
      hr_holiday_generator/models/holiday_log.py
  7. 36
      hr_holiday_generator/models/res_config_settings.py
  8. 6
      hr_holiday_generator/security/ir.model.access.csv
  9. BIN
      hr_holiday_generator/static/description/assets/icons/check.png
  10. BIN
      hr_holiday_generator/static/description/assets/icons/chevron.png
  11. BIN
      hr_holiday_generator/static/description/assets/icons/cogs.png
  12. BIN
      hr_holiday_generator/static/description/assets/icons/consultation.png
  13. BIN
      hr_holiday_generator/static/description/assets/icons/ecom-black.png
  14. BIN
      hr_holiday_generator/static/description/assets/icons/education-black.png
  15. BIN
      hr_holiday_generator/static/description/assets/icons/hotel-black.png
  16. BIN
      hr_holiday_generator/static/description/assets/icons/license.png
  17. BIN
      hr_holiday_generator/static/description/assets/icons/lifebuoy.png
  18. BIN
      hr_holiday_generator/static/description/assets/icons/manufacturing-black.png
  19. BIN
      hr_holiday_generator/static/description/assets/icons/pos-black.png
  20. BIN
      hr_holiday_generator/static/description/assets/icons/puzzle.png
  21. BIN
      hr_holiday_generator/static/description/assets/icons/restaurant-black.png
  22. BIN
      hr_holiday_generator/static/description/assets/icons/service-black.png
  23. BIN
      hr_holiday_generator/static/description/assets/icons/trading-black.png
  24. BIN
      hr_holiday_generator/static/description/assets/icons/training.png
  25. BIN
      hr_holiday_generator/static/description/assets/icons/update.png
  26. BIN
      hr_holiday_generator/static/description/assets/icons/user.png
  27. BIN
      hr_holiday_generator/static/description/assets/icons/wrench.png
  28. BIN
      hr_holiday_generator/static/description/assets/misc/categories.png
  29. BIN
      hr_holiday_generator/static/description/assets/misc/check-box.png
  30. BIN
      hr_holiday_generator/static/description/assets/misc/compass.png
  31. BIN
      hr_holiday_generator/static/description/assets/misc/corporate.png
  32. BIN
      hr_holiday_generator/static/description/assets/misc/customer-support.png
  33. BIN
      hr_holiday_generator/static/description/assets/misc/cybrosys-logo.png
  34. BIN
      hr_holiday_generator/static/description/assets/misc/features.png
  35. BIN
      hr_holiday_generator/static/description/assets/misc/logo.png
  36. BIN
      hr_holiday_generator/static/description/assets/misc/pictures.png
  37. BIN
      hr_holiday_generator/static/description/assets/misc/pie-chart.png
  38. BIN
      hr_holiday_generator/static/description/assets/misc/right-arrow.png
  39. BIN
      hr_holiday_generator/static/description/assets/misc/star.png
  40. BIN
      hr_holiday_generator/static/description/assets/misc/support.png
  41. BIN
      hr_holiday_generator/static/description/assets/misc/whatsapp.png
  42. BIN
      hr_holiday_generator/static/description/assets/modules/1.png
  43. BIN
      hr_holiday_generator/static/description/assets/modules/2.png
  44. BIN
      hr_holiday_generator/static/description/assets/modules/3.png
  45. BIN
      hr_holiday_generator/static/description/assets/modules/4.png
  46. BIN
      hr_holiday_generator/static/description/assets/modules/5.gif
  47. BIN
      hr_holiday_generator/static/description/assets/modules/6.png
  48. BIN
      hr_holiday_generator/static/description/assets/screenshots/0.png
  49. BIN
      hr_holiday_generator/static/description/assets/screenshots/1.png
  50. BIN
      hr_holiday_generator/static/description/assets/screenshots/10.png
  51. BIN
      hr_holiday_generator/static/description/assets/screenshots/2.png
  52. BIN
      hr_holiday_generator/static/description/assets/screenshots/3.png
  53. BIN
      hr_holiday_generator/static/description/assets/screenshots/4.png
  54. BIN
      hr_holiday_generator/static/description/assets/screenshots/5.png
  55. BIN
      hr_holiday_generator/static/description/assets/screenshots/6.png
  56. BIN
      hr_holiday_generator/static/description/assets/screenshots/7.png
  57. BIN
      hr_holiday_generator/static/description/assets/screenshots/8.png
  58. BIN
      hr_holiday_generator/static/description/assets/screenshots/9.png
  59. BIN
      hr_holiday_generator/static/description/assets/screenshots/hero.gif
  60. BIN
      hr_holiday_generator/static/description/banner.png
  61. BIN
      hr_holiday_generator/static/description/icon.png
  62. 682
      hr_holiday_generator/static/description/index.html
  63. 49
      hr_holiday_generator/views/holiday_log_views.xml
  64. 48
      hr_holiday_generator/views/res_config_settings_views.xml
  65. 25
      hr_holiday_generator/wizard/__init__.py
  66. 59
      hr_holiday_generator/wizard/calendar_leave.py
  67. 106
      hr_holiday_generator/wizard/calendar_leave_generator.py
  68. 31
      hr_holiday_generator/wizard/calendar_leave_generator_views.xml
  69. 198
      hr_holiday_generator/wizard/hr_holiday_generator.py
  70. 66
      hr_holiday_generator/wizard/hr_holiday_generator_views.xml
  71. 67
      hr_holiday_generator/wizard/overlapping_date.py
  72. 23
      hr_holiday_generator/wizard/overlapping_date_views.xml

49
hr_holiday_generator/README.rst

@ -0,0 +1,49 @@
.. 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/15.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: (V15) Mohammed Irfan T ,Contact : odoo@cybrosys.com
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>`__

23
hr_holiday_generator/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (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

48
hr_holiday_generator/__manifest__.py

@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (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": "15.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.png'],
'license': 'LGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

6
hr_holiday_generator/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <hr_holiday_generator>
#### 28.06.2024
#### Version 15.0.1.0.0
##### ADD
- Initial Commit for HR Holiday Generator

23
hr_holiday_generator/models/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (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

36
hr_holiday_generator/models/holiday_log.py

@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (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")

36
hr_holiday_generator/models/res_config_settings.py

@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (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.")

6
hr_holiday_generator/security/ir.model.access.csv

@ -0,0 +1,6 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_hr_holiday_generator_user,access.hr.holiday.generator.user,model_hr_holiday_generator,base.group_user,1,1,1,1
access_calendar_leave_user,access.calendar.leave.user,model_calendar_leave,base.group_user,1,1,1,1
access_holiday_log_user,access.holiday.log.user,model_holiday_log,base.group_user,1,1,1,1
access_overlapping_date_user,access.overlapping.date.user,model_overlapping_date,base.group_user,1,1,1,1
access_calendar_leave_generator_user,access.calendar.leave.generator.user,model_calendar_leave_generator,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_hr_holiday_generator_user access.hr.holiday.generator.user model_hr_holiday_generator base.group_user 1 1 1 1
3 access_calendar_leave_user access.calendar.leave.user model_calendar_leave base.group_user 1 1 1 1
4 access_holiday_log_user access.holiday.log.user model_holiday_log base.group_user 1 1 1 1
5 access_overlapping_date_user access.overlapping.date.user model_overlapping_date base.group_user 1 1 1 1
6 access_calendar_leave_generator_user access.calendar.leave.generator.user model_calendar_leave_generator base.group_user 1 1 1 1

BIN
hr_holiday_generator/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
hr_holiday_generator/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
hr_holiday_generator/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
hr_holiday_generator/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
hr_holiday_generator/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
hr_holiday_generator/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
hr_holiday_generator/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
hr_holiday_generator/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
hr_holiday_generator/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
hr_holiday_generator/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
hr_holiday_generator/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
hr_holiday_generator/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
hr_holiday_generator/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
hr_holiday_generator/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
hr_holiday_generator/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
hr_holiday_generator/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
hr_holiday_generator/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
hr_holiday_generator/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
hr_holiday_generator/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
hr_holiday_generator/static/description/assets/misc/categories.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
hr_holiday_generator/static/description/assets/misc/check-box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
hr_holiday_generator/static/description/assets/misc/compass.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
hr_holiday_generator/static/description/assets/misc/corporate.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
hr_holiday_generator/static/description/assets/misc/customer-support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
hr_holiday_generator/static/description/assets/misc/cybrosys-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
hr_holiday_generator/static/description/assets/misc/features.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
hr_holiday_generator/static/description/assets/misc/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
hr_holiday_generator/static/description/assets/misc/pictures.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
hr_holiday_generator/static/description/assets/misc/pie-chart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
hr_holiday_generator/static/description/assets/misc/right-arrow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

BIN
hr_holiday_generator/static/description/assets/misc/star.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
hr_holiday_generator/static/description/assets/misc/support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
hr_holiday_generator/static/description/assets/misc/whatsapp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
hr_holiday_generator/static/description/assets/modules/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
hr_holiday_generator/static/description/assets/modules/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
hr_holiday_generator/static/description/assets/modules/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
hr_holiday_generator/static/description/assets/modules/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
hr_holiday_generator/static/description/assets/modules/5.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
hr_holiday_generator/static/description/assets/modules/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
hr_holiday_generator/static/description/assets/screenshots/0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
hr_holiday_generator/static/description/assets/screenshots/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

BIN
hr_holiday_generator/static/description/assets/screenshots/10.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 KiB

BIN
hr_holiday_generator/static/description/assets/screenshots/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

BIN
hr_holiday_generator/static/description/assets/screenshots/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 KiB

BIN
hr_holiday_generator/static/description/assets/screenshots/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
hr_holiday_generator/static/description/assets/screenshots/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 KiB

BIN
hr_holiday_generator/static/description/assets/screenshots/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 KiB

BIN
hr_holiday_generator/static/description/assets/screenshots/7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
hr_holiday_generator/static/description/assets/screenshots/8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 KiB

BIN
hr_holiday_generator/static/description/assets/screenshots/9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

BIN
hr_holiday_generator/static/description/assets/screenshots/hero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 KiB

BIN
hr_holiday_generator/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
hr_holiday_generator/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

682
hr_holiday_generator/static/description/index.html

@ -0,0 +1,682 @@
<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 &amp;
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/0.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/1.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/2.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/3.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/4.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/5.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/6.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/7.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/8.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/9.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/10.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/15.0/dynamic_accounts_report/" 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/15.0/custom_gantt_view/" 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/15.0/project_custom_gantt/" 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/15.0/account_reports_xlsx/" 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/15.0/base_accounting_kit/" target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block" style="border-radius: 0px;"
src="assets/modules/5.gif">
</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/15.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/6.png">
</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 &amp; 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 -->

49
hr_holiday_generator/views/holiday_log_views.xml

@ -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>

48
hr_holiday_generator/views/res_config_settings_views.xml

@ -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>

25
hr_holiday_generator/wizard/__init__.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (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

59
hr_holiday_generator/wizard/calendar_leave.py

@ -0,0 +1,59 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (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)

106
hr_holiday_generator/wizard/calendar_leave_generator.py

@ -0,0 +1,106 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (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])

31
hr_holiday_generator/wizard/calendar_leave_generator_views.xml

@ -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>

198
hr_holiday_generator/wizard/hr_holiday_generator.py

@ -0,0 +1,198 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (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])

66
hr_holiday_generator/wizard/hr_holiday_generator_views.xml

@ -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>

67
hr_holiday_generator/wizard/overlapping_date.py

@ -0,0 +1,67 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Mohammed Irfan T (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}
}

23
hr_holiday_generator/wizard/overlapping_date_views.xml

@ -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>
Loading…
Cancel
Save