Initial commit: Hr packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:50 +02:00
commit 62531cd146
2820 changed files with 1432848 additions and 0 deletions

View file

@ -0,0 +1,61 @@
# Time Off
Manage time off requests and allocations
=====================================
This application controls the time off schedule of your company. It allows employees to request time off. Then, managers can review requests for time off and approve or reject them. This way you can control the overall time off planning for the company or department.
You can configure several kinds of time off (sickness, paid days, ...) and allocate time off to an employee or department quickly using time off allocation. An employee can also make a request for more days off by making a new time off allocation. It will increase the total of available days for that time off type (if the request is accepted).
You can keep track of time off in different ways by following reports:
* Time Off Summary
* Time Off by Department
* Time Off Analysis
A synchronization with an internal agenda (Meetings of the CRM module) is also possible in order to automatically create a meeting when a time off request is accepted by setting up a type of meeting in time off Type.
## Installation
```bash
pip install odoo-bringout-oca-ocb-hr_holidays
```
## Dependencies
This addon depends on:
- hr
- calendar
- resource
## Manifest Information
- **Name**: Time Off
- **Version**: 1.6
- **Category**: Human Resources/Time Off
- **License**: LGPL-3
- **Installable**: True
## Source
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `hr_holidays`.
## License
This package maintains the original LGPL-3 license from the upstream Odoo project.
## Documentation
- Overview: doc/OVERVIEW.md
- Architecture: doc/ARCHITECTURE.md
- Models: doc/MODELS.md
- Controllers: doc/CONTROLLERS.md
- Wizards: doc/WIZARDS.md
- Install: doc/INSTALL.md
- Usage: doc/USAGE.md
- Configuration: doc/CONFIGURATION.md
- Dependencies: doc/DEPENDENCIES.md
- Troubleshooting: doc/TROUBLESHOOTING.md
- FAQ: doc/FAQ.md

View file

@ -0,0 +1,32 @@
# Architecture
```mermaid
flowchart TD
U[Users] -->|HTTP| V[Views and QWeb Templates]
V --> C[Controllers]
V --> W[Wizards Transient Models]
C --> M[Models and ORM]
W --> M
M --> R[Reports]
DX[Data XML] --> M
S[Security ACLs and Groups] -. enforces .-> M
subgraph Hr_holidays Module - hr_holidays
direction LR
M:::layer
W:::layer
C:::layer
V:::layer
R:::layer
S:::layer
DX:::layer
end
classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px
```
Notes
- Views include tree/form/kanban templates and report templates.
- Controllers provide website/portal routes when present.
- Wizards are UI flows implemented with `models.TransientModel`.
- Data XML loads data/demo records; Security defines groups and access.

View file

@ -0,0 +1,3 @@
# Configuration
Refer to Odoo settings for hr_holidays. Configure related models, access rights, and options as needed.

View file

@ -0,0 +1,17 @@
# Controllers
HTTP routes provided by this module.
```mermaid
sequenceDiagram
participant U as User/Client
participant C as Module Controllers
participant O as ORM/Views
U->>C: HTTP GET/POST (routes)
C->>O: ORM operations, render templates
O-->>U: HTML/JSON/PDF
```
Notes
- See files in controllers/ for route definitions.

View file

@ -0,0 +1,7 @@
# Dependencies
This addon depends on:
- [hr](../../odoo-bringout-oca-ocb-hr)
- [calendar](../../odoo-bringout-oca-ocb-calendar)
- [resource](../../odoo-bringout-oca-ocb-resource)

View file

@ -0,0 +1,4 @@
# FAQ
- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged).
- Q: How to enable? A: Start server with --addon hr_holidays or install in UI.

View file

@ -0,0 +1,7 @@
# Install
```bash
pip install odoo-bringout-oca-ocb-hr_holidays"
# or
uv pip install odoo-bringout-oca-ocb-hr_holidays"
```

View file

@ -0,0 +1,25 @@
# Models
Detected core models and extensions in hr_holidays.
```mermaid
classDiagram
class hr_leave
class hr_leave_accrual_level
class hr_leave_accrual_plan
class hr_leave_allocation
class hr_leave_stress_day
class hr_leave_type
class hr_department
class hr_employee
class hr_employee_base
class mail_message_subtype
class resource_calendar
class resource_calendar_leaves
class res_partner
class res_users
```
Notes
- Classes show model technical names; fields omitted for brevity.
- Items listed under _inherit are extensions of existing models.

View file

@ -0,0 +1,6 @@
# Overview
Packaged Odoo addon: hr_holidays. Provides features documented in upstream Odoo 16 under this addon.
- Source: OCA/OCB 16.0, addon hr_holidays
- License: LGPL-3

View file

@ -0,0 +1,41 @@
# Reports
Report definitions and templates in hr_holidays.
```mermaid
classDiagram
class LeaveReport
Model <|-- LeaveReport
class HrHolidaySummaryReport
AbstractModel <|-- HrHolidaySummaryReport
class LeaveReportCalendar
Model <|-- LeaveReportCalendar
class LeaveReport
Model <|-- LeaveReport
```
## Available Reports
### PDF/Document Reports
- **Time Off Summary** (PDF/Print)
- **Time Off Summary** (PDF/Print)
## Report Files
- **holidays_summary_report.py** (Python logic)
- **hr_holidays_reports.xml** (XML template/definition)
- **hr_holidays_templates.xml** (XML template/definition)
- **hr_leave_employee_type_report.py** (Python logic)
- **hr_leave_employee_type_report.xml** (XML template/definition)
- **hr_leave_report_calendar.py** (Python logic)
- **hr_leave_report_calendar.xml** (XML template/definition)
- **hr_leave_report.py** (Python logic)
- **hr_leave_reports.xml** (XML template/definition)
- **__init__.py** (Python logic)
## Notes
- Named reports above are accessible through Odoo's reporting menu
- Python files define report logic and data processing
- XML files contain report templates, definitions, and formatting
- Reports are integrated with Odoo's printing and email systems

View file

@ -0,0 +1,42 @@
# Security
Access control and security definitions in hr_holidays.
## Access Control Lists (ACLs)
Model access permissions defined in:
- **[ir.model.access.csv](../hr_holidays/security/ir.model.access.csv)**
- 25 model access rules
## Record Rules
Row-level security rules defined in:
## Security Groups & Configuration
Security groups and permissions defined in:
- **[hr_holidays_security.xml](../hr_holidays/security/hr_holidays_security.xml)**
- 3 security groups defined
```mermaid
graph TB
subgraph "Security Layers"
A[Users] --> B[Groups]
B --> C[Access Control Lists]
C --> D[Models]
B --> E[Record Rules]
E --> F[Individual Records]
end
```
Security files overview:
- **[hr_holidays_security.xml](../hr_holidays/security/hr_holidays_security.xml)**
- Security groups, categories, and XML-based rules
- **[ir.model.access.csv](../hr_holidays/security/ir.model.access.csv)**
- Model access permissions (CRUD rights)
Notes
- Access Control Lists define which groups can access which models
- Record Rules provide row-level security (filter records by user/group)
- Security groups organize users and define permission sets
- All security is enforced at the ORM level by Odoo

View file

@ -0,0 +1,5 @@
# Troubleshooting
- Ensure Python and Odoo environment matches repo guidance.
- Check database connectivity and logs if startup fails.
- Validate that dependent addons listed in DEPENDENCIES.md are installed.

View file

@ -0,0 +1,7 @@
# Usage
Start Odoo including this addon (from repo root):
```bash
python3 scripts/nix_odoo_web_server.py --db-name mydb --addon hr_holidays
```

View file

@ -0,0 +1,10 @@
# Wizards
Transient models exposed as UI wizards in hr_holidays.
```mermaid
classDiagram
class HolidaysSummaryEmployee
class HrDepartureWizard
class HrHolidaysCancelLeave
```

View file

@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import controllers
from . import models
from . import populate
from . import report
from . import wizard

View file

@ -0,0 +1,106 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Time Off',
'version': '1.6',
'category': 'Human Resources/Time Off',
'sequence': 85,
'summary': 'Allocate PTOs and follow leaves requests',
'website': 'https://www.odoo.com/app/time-off',
'description': """
Manage time off requests and allocations
=====================================
This application controls the time off schedule of your company. It allows employees to request time off. Then, managers can review requests for time off and approve or reject them. This way you can control the overall time off planning for the company or department.
You can configure several kinds of time off (sickness, paid days, ...) and allocate time off to an employee or department quickly using time off allocation. An employee can also make a request for more days off by making a new time off allocation. It will increase the total of available days for that time off type (if the request is accepted).
You can keep track of time off in different ways by following reports:
* Time Off Summary
* Time Off by Department
* Time Off Analysis
A synchronization with an internal agenda (Meetings of the CRM module) is also possible in order to automatically create a meeting when a time off request is accepted by setting up a type of meeting in time off Type.
""",
'depends': ['hr', 'calendar', 'resource'],
'data': [
'data/report_paperformat.xml',
'data/mail_activity_type_data.xml',
'data/mail_message_subtype_data.xml',
'data/hr_holidays_data.xml',
'data/ir_cron_data.xml',
'security/hr_holidays_security.xml',
'security/ir.model.access.csv',
'views/resource_views.xml',
'views/hr_leave_views.xml',
'views/hr_leave_type_views.xml',
'views/hr_leave_allocation_views.xml',
'views/hr_leave_accrual_views.xml',
'views/hr_leave_stress_day_views.xml',
'views/mail_activity_views.xml',
'wizard/hr_holidays_cancel_leave_views.xml',
'wizard/hr_holidays_summary_employees_views.xml',
'wizard/hr_departure_wizard_views.xml',
'report/hr_holidays_templates.xml',
'report/hr_holidays_reports.xml',
'report/hr_leave_reports.xml',
'report/hr_leave_report_calendar.xml',
'report/hr_leave_employee_type_report.xml',
'views/hr_views.xml',
'views/hr_holidays_views.xml',
],
'demo': [
'data/hr_holidays_demo.xml',
],
'installable': True,
'application': True,
'assets': {
'mail.assets_messaging': [
'hr_holidays/static/src/models/*.js',
],
'mail.assets_discuss_public': [
'hr_holidays/static/src/components/*/*',
],
'web.assets_backend': [
'hr_holidays/static/src/views/**/*.js',
'hr_holidays/static/src/views/**/*.scss',
'hr_holidays/static/src/views/**/*.xml',
'hr_holidays/static/src/components/*/*.scss',
'hr_holidays/static/src/components/*/*.xml',
'hr_holidays/static/src/dashboard/**/*.js',
'hr_holidays/static/src/dashboard/**/*.scss',
'hr_holidays/static/src/dashboard/**/*.xml',
'hr_holidays/static/src/leave_stats/**/*.js',
'hr_holidays/static/src/leave_stats/**/*.xml',
'hr_holidays/static/src/scss/*.scss',
'hr_holidays/static/src/tours/*.js',
'hr_holidays/static/src/radio_image_field/*.js',
'hr_holidays/static/src/radio_image_field/*.xml',
# Don't include dark mode files in light mode
('remove', 'hr_holidays/static/src/views/**/*.dark.scss'),
('remove', 'hr_holidays/static/src/dashboard/**/*.dark.scss'),
],
"web.dark_mode_assets_backend": [
'hr_holidays/static/src/views/**/*.dark.scss',
'hr_holidays/static/src/dashboard/**/*.dark.scss',
],
'web.tests_assets': [
'hr_holidays/static/tests/helpers/**/*',
],
'web.qunit_suite_tests': [
'hr_holidays/static/tests/qunit_suite_tests/**/*.js',
],
'web.assets_tests': [
'/hr_holidays/static/tests/tours/**/**.js'
],
},
'license': 'LGPL-3',
}

View file

@ -0,0 +1,2 @@
# -*- coding: utf-8 -*
from . import main

View file

@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.mail.controllers.mail import MailController
from odoo import http
class HrHolidaysController(http.Controller):
@http.route('/leave/validate', type='http', auth='user', methods=['GET'])
def hr_holidays_request_validate(self, res_id, token):
comparison, record, redirect = MailController._check_token_and_record_or_redirect('hr.leave', int(res_id), token)
if comparison and record:
try:
record.action_approve()
except Exception:
return MailController._redirect_to_generic_fallback('hr.leave', res_id)
return redirect
@http.route('/leave/refuse', type='http', auth='user', methods=['GET'])
def hr_holidays_request_refuse(self, res_id, token):
comparison, record, redirect = MailController._check_token_and_record_or_redirect('hr.leave', int(res_id), token)
if comparison and record:
try:
record.action_refuse()
except Exception:
return MailController._redirect_to_generic_fallback('hr.leave', res_id)
return redirect
@http.route('/allocation/validate', type='http', auth='user', methods=['GET'])
def hr_holidays_allocation_validate(self, res_id, token):
comparison, record, redirect = MailController._check_token_and_record_or_redirect('hr.leave.allocation', int(res_id), token)
if comparison and record:
try:
record.action_approve()
except Exception:
return MailController._redirect_to_generic_fallback('hr.leave.allocation', res_id)
return redirect
@http.route('/allocation/refuse', type='http', auth='user', methods=['GET'])
def hr_holidays_allocation_refuse(self, res_id, token):
comparison, record, redirect = MailController._check_token_and_record_or_redirect('hr.leave.allocation', int(res_id), token)
if comparison and record:
try:
record.action_refuse()
except Exception:
return MailController._redirect_to_generic_fallback('hr.leave.allocation', res_id)
return redirect

View file

@ -0,0 +1,316 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="icon_1" model="ir.attachment">
<field name="name">Annual_Time_Off.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Annual_Time_Off.svg</field>
</record>
<record id="icon_2" model="ir.attachment">
<field name="name">Annual_Time_Off_2.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Annual_Time_Off_2.svg</field>
</record>
<record id="icon_3" model="ir.attachment">
<field name="name">Annual_Time_Off_3.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Annual_Time_Off_3.svg</field>
</record>
<record id="icon_4" model="ir.attachment">
<field name="name">Compensatory_Time_Off.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Compensatory_Time_Off.svg</field>
</record>
<record id="icon_5" model="ir.attachment">
<field name="name">Compensatory_Time_Off_2.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Compensatory_Time_Off_2.svg</field>
</record>
<record id="icon_6" model="ir.attachment">
<field name="name">Compensatory_Time_Off_3.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Compensatory_Time_Off_3.svg</field>
</record>
<record id="icon_7" model="ir.attachment">
<field name="name">Credit_Time.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Credit_Time.svg</field>
</record>
<record id="icon_8" model="ir.attachment">
<field name="name">Credit_Time_2.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Credit_Time_2.svg</field>
</record>
<record id="icon_9" model="ir.attachment">
<field name="name">Extra_Time_Off.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Extra_Time_Off.svg</field>
</record>
<record id="icon_10" model="ir.attachment">
<field name="name">Extra_Time_Off_2.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Extra_Time_Off_2.svg</field>
</record>
<record id="icon_11" model="ir.attachment">
<field name="name">Maternity_Time_Off.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Maternity_Time_Off.svg</field>
</record>
<record id="icon_12" model="ir.attachment">
<field name="name">Maternity_Time_Off_2.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Maternity_Time_Off_2.svg</field>
</record>
<record id="icon_13" model="ir.attachment">
<field name="name">Maternity_Time_Off_3.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Maternity_Time_Off_3.svg</field>
</record>
<record id="icon_14" model="ir.attachment">
<field name="name">Paid_Time_Off.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Paid_Time_Off.svg</field>
</record>
<record id="icon_15" model="ir.attachment">
<field name="name">Paid_Time_Off_2.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Paid_Time_Off_2.svg</field>
</record>
<record id="icon_16" model="ir.attachment">
<field name="name">Paid_Time_Off_3.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Paid_Time_Off_3.svg</field>
</record>
<record id="icon_17" model="ir.attachment">
<field name="name">Parental_Time_Off.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Parental_Time_Off.svg</field>
</record>
<record id="icon_18" model="ir.attachment">
<field name="name">Parental_Time_Off_2.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Parental_Time_Off_2.svg</field>
</record>
<record id="icon_19" model="ir.attachment">
<field name="name">Recovery_Bank_Holiday.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Recovery_Bank_Holiday.svg</field>
</record>
<record id="icon_20" model="ir.attachment">
<field name="name">Recovery_Bank_Holiday_2.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Recovery_Bank_Holiday_2.svg</field>
</record>
<record id="icon_21" model="ir.attachment">
<field name="name">Sick_Time_Off.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Sick_Time_Off.svg</field>
</record>
<record id="icon_22" model="ir.attachment">
<field name="name">Sick_Time_Off_2.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Sick_Time_Off_2.svg</field>
</record>
<record id="icon_23" model="ir.attachment">
<field name="name">Small_Unemployement.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Small_Unemployement.svg</field>
</record>
<record id="icon_24" model="ir.attachment">
<field name="name">Small_Unemployement_2.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Small_Unemployement_2.svg</field>
</record>
<record id="icon_25" model="ir.attachment">
<field name="name">Small_Unemployement_3.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Small_Unemployement_3.svg</field>
</record>
<record id="icon_26" model="ir.attachment">
<field name="name">Training_Time_Off.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Training_Time_Off.svg</field>
</record>
<record id="icon_27" model="ir.attachment">
<field name="name">Training_Time_Off_2.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Training_Time_Off_2.svg</field>
</record>
<record id="icon_28" model="ir.attachment">
<field name="name">Unpaid_Time_Off.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Unpaid_Time_Off.svg</field>
</record>
<record id="icon_29" model="ir.attachment">
<field name="name">Unpaid_Time_Off_2.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Unpaid_Time_Off_2.svg</field>
</record>
<record id="icon_30" model="ir.attachment">
<field name="name">Work_Accident_Time_Off.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Work_Accident_Time_Off.svg</field>
</record>
<record id="icon_31" model="ir.attachment">
<field name="name">Work_Accident_Time_Off_2.svg</field>
<field name="res_model">hr.leave.type</field>
<field name="res_field">icon_id</field>
<field name="public" eval="True"/>
<field name="type">url</field>
<field name="url">/hr_holidays/static/src/img/icons/Work_Accident_Time_Off_2.svg</field>
</record>
</data>
<data noupdate="1">
<!-- Casual leave -->
<record id="holiday_status_cl" model="hr.leave.type">
<field name="name">Paid Time Off</field>
<field name="requires_allocation">yes</field>
<field name="employee_requests">no</field>
<field name="leave_validation_type">both</field>
<field name="allocation_validation_type">officer</field>
<field name="leave_notif_subtype_id" ref="mt_leave"/>
<field name="allocation_notif_subtype_id" ref="mt_leave_allocation"/>
<field name="responsible_id" ref="base.user_admin"/>
<field name="icon_id" ref="hr_holidays.icon_14"/>
<field name="color">2</field>
<field name="company_id" eval="False"/> <!-- Explicitely set to False for it to be available to all companies -->
<field name="sequence">1</field>
</record>
<!-- Sick leave -->
<record id="holiday_status_sl" model="hr.leave.type">
<field name="name">Sick Time Off</field>
<field name="requires_allocation">no</field>
<field name="color_name">red</field>
<field name="leave_notif_subtype_id" ref="mt_leave_sick"/>
<field name="responsible_id" ref="base.user_admin"/>
<field name="support_document">True</field>
<field name="icon_id" ref="hr_holidays.icon_22"/>
<field name="color">3</field>
<field name="company_id" eval="False"/> <!-- Explicitely set to False for it to be available to all companies -->
<field name="sequence">2</field>
</record>
<!-- Compensatory Days -->
<record id="holiday_status_comp" model="hr.leave.type">
<field name="name">Compensatory Days</field>
<field name="requires_allocation">yes</field>
<field name="employee_requests">yes</field>
<field name="leave_validation_type">manager</field>
<field name="allocation_validation_type">officer</field>
<field name="request_unit">hour</field>
<field name="leave_notif_subtype_id" ref="mt_leave"/>
<field name="responsible_id" ref="base.user_admin"/>
<field name="icon_id" ref="hr_holidays.icon_4"/>
<field name="color">4</field>
<field name="company_id" eval="False"/> <!-- Explicitely set to False for it to be available to all companies -->
<field name="sequence">4</field>
</record>
<!--Unpaid Leave -->
<record id="holiday_status_unpaid" model="hr.leave.type">
<field name="name">Unpaid</field>
<field name="requires_allocation">no</field>
<field name="leave_validation_type">both</field>
<field name="allocation_validation_type">officer</field>
<field name="request_unit">hour</field>
<field name="unpaid" eval="True"/>
<field name="leave_notif_subtype_id" ref="mt_leave_unpaid"/>
<field name="responsible_id" ref="base.user_admin"/>
<field name="icon_id" ref="hr_holidays.icon_28"/>
<field name="color">5</field>
<field name="company_id" eval="False"/> <!-- Explicitely set to False for it to be available to all companies -->
<field name="sequence">3</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,492 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="base.user_demo" model="res.users">
<field name="groups_id" eval="[(4, ref('hr_holidays.group_hr_holidays_user'))]"/>
</record>
<!--Leave Type-->
<record id="hr_holiday_status_dv" model="hr.leave.type">
<field name="name">Parental Leaves</field>
<field name="requires_allocation">yes</field>
<field name="employee_requests">no</field>
<field name="color_name">brown</field>
<field name="leave_validation_type">both</field>
<field name="allocation_validation_type">officer</field>
<field name="responsible_id" ref="base.user_admin"/>
<field name="icon_id" ref="hr_holidays.icon_11"/>
</record>
<record id="holiday_status_training" model="hr.leave.type">
<field name="name">Training Time Off</field>
<field name="requires_allocation">yes</field>
<field name="employee_requests">no</field>
<field name="color_name">lightyellow</field>
<field name="leave_validation_type">both</field>
<field name="allocation_validation_type">officer</field>
<field name="responsible_id" ref="base.user_admin"/>
<field name="icon_id" ref="hr_holidays.icon_26"/>
</record>
<!-- Accrual Plan -->
<record id="hr_accrual_plan_1" model="hr.leave.accrual.plan">
<field name="name">Seniority Plan</field>
</record>
<record id="hr_accrual_level_1" model="hr.leave.accrual.level">
<field name="accrual_plan_id" ref="hr_accrual_plan_1" />
<field name="start_count">1</field>
<field name="start_type">day</field>
<field name="added_value">1</field>
<field name="frequency">yearly</field>
</record>
<record id="hr_accrual_level_2" model="hr.leave.accrual.level">
<field name="accrual_plan_id" ref="hr_accrual_plan_1" />
<field name="start_count">4</field>
<field name="start_type">year</field>
<field name="added_value">2</field>
<field name="frequency">yearly</field>
</record>
<record id="hr_accrual_level_3" model="hr.leave.accrual.level">
<field name="accrual_plan_id" ref="hr_accrual_plan_1" />
<field name="start_count">8</field>
<field name="start_type">year</field>
<field name="added_value">3</field>
<field name="frequency">yearly</field>
</record>
<!-- ++++++++++++++++++++++ Mitchell Admin ++++++++++++++++++++++ -->
<record id="hr_holidays_allocation_cl" model="hr.leave.allocation">
<field name="name">Paid Time Off for Mitchell Admin</field>
<field name="holiday_status_id" ref="holiday_status_cl"/>
<field name="number_of_days">20</field>
<field name="employee_id" ref="hr.employee_admin"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_admin'))]"/>
<field name="state">confirm</field>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<record id="hr_holidays_int_tour" model="hr.leave.allocation">
<field name="name">International Tour</field>
<field name="holiday_status_id" ref="holiday_status_comp"/>
<field name="number_of_days">7</field>
<field name="employee_id" ref="hr.employee_admin"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_admin'))]"/>
<field name="state">confirm</field>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<record id="hr_holidays_vc" model="hr.leave.allocation">
<field name="name">Functional Training</field>
<field name="holiday_status_id" ref="holiday_status_training"/>
<field name="number_of_days">7</field>
<field name="state">confirm</field>
<field name="employee_id" ref="hr.employee_admin"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_admin'))]"/>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<record id='hr_holidays_cl_allocation' model="hr.leave.allocation">
<field name="name">Compensation</field>
<field name="holiday_status_id" ref="holiday_status_comp"/>
<field name="number_of_days">12</field>
<field name="employee_id" ref="hr.employee_admin"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_admin'))]"/>
<field name="state">confirm</field>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<function model="hr.leave.allocation" name="action_validate">
<value eval="[ref('hr_holidays_allocation_cl'), ref('hr_holidays_int_tour'), ref('hr_holidays_cl_allocation')]"/>
</function>
<!-- leave request -->
<record id="hr_holidays_cl" model="hr.leave">
<field name="name">Trip with Family</field>
<field name="holiday_status_id" ref="holiday_status_comp"/>
<field eval="(datetime.now() + relativedelta(day=1, weekday=0)).strftime('%Y-%m-%d 04:00:00')" name="date_from"/>
<field eval="(datetime.now() + relativedelta(day=1, weekday=0) + relativedelta(weekday=2)).strftime('%Y-%m-%d 20:00:00')" name="date_to"/>
<field eval="(datetime.now() + relativedelta(day=1, weekday=0)).strftime('%Y-%m-%d 04:00:00')" name="request_date_from"/>
<field eval="(datetime.now() + relativedelta(day=1, weekday=0) + relativedelta(weekday=2)).strftime('%Y-%m-%d 20:00:00')" name="request_date_to"/>
<field name="employee_id" ref="hr.employee_admin"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_admin'))]"/>
</record>
<record id="hr_holidays_sl" model="hr.leave">
<field name="name">Doctor Appointment</field>
<field name="holiday_status_id" ref="holiday_status_sl"/>
<field eval="(datetime.now() + relativedelta(day=20, weekday=0)).strftime('%Y-%m-%d 04:00:00')" name="date_from"/>
<field eval="(datetime.now() + relativedelta(day=20, weekday=0) + relativedelta(weekday=2)).strftime('%Y-%m-%d 20:00:00')" name="date_to"/>
<field eval="(datetime.now() + relativedelta(day=20, weekday=0)).strftime('%Y-%m-%d 04:00:00')" name="request_date_from"/>
<field eval="(datetime.now() + relativedelta(day=20, weekday=0) + relativedelta(weekday=2)).strftime('%Y-%m-%d 20:00:00')" name="request_date_to"/>
<field name="employee_id" ref="hr.employee_admin"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_admin'))]"/>
<field name="state">confirm</field>
</record>
<function model="hr.leave" name="action_validate">
<value eval="ref('hr_holidays.hr_holidays_sl')"/>
</function>
<record id="hr.employee_al" model="hr.employee">
<field name="leave_manager_id" ref="base.user_admin"/>
</record>
<record id="hr.employee_mit" model="hr.employee">
<field name="leave_manager_id" ref="base.user_admin"/>
</record>
<record id="hr.employee_qdp" model="hr.employee">
<field name="leave_manager_id" ref="base.user_admin"/>
</record>
<record id="hr.employee_niv" model="hr.employee">
<field name="leave_manager_id" ref="base.user_admin"/>
</record>
<record id="hr.employee_jve" model="hr.employee">
<field name="leave_manager_id" ref="base.user_admin"/>
</record>
<!-- ++++++++++++++++++++++ Ronnie Hart ++++++++++++++++++++++ -->
<record id="hr_holidays_allocation_cl_al" model="hr.leave.allocation">
<field name="name">Paid Time Off for Ronnie Hart</field>
<field name="holiday_status_id" ref="holiday_status_cl"/>
<field name="number_of_days">20</field>
<field name="employee_id" ref="hr.employee_al"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_al'))]"/>
<field name="state">confirm</field>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<record id="hr_holidays_allocation_pl_al" model="hr.leave.allocation">
<field name="name">Parental Leaves</field>
<field name="holiday_status_id" ref="hr_holiday_status_dv"/>
<field name="number_of_days">10</field>
<field name="employee_id" ref="hr.employee_al"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_al'))]"/>
<field name="state">confirm</field>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<record id="hr_holidays_vc_al" model="hr.leave.allocation">
<field name="name">Soft Skills Training</field>
<field name="holiday_status_id" ref="holiday_status_training"/>
<field name="number_of_days">12</field>
<field name="employee_id" ref="hr.employee_al"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_al'))]"/>
<field name="state">confirm</field>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<function model="hr.leave.allocation" name="action_validate">
<value eval="[ref('hr_holidays_allocation_cl_al'), ref('hr_holidays_allocation_pl_al'), ref('hr_holidays_vc_al')]"/>
</function>
<!-- leave request -->
<record id="hr_holidays_cl_al" model="hr.leave">
<field name="name">Trip with Friends</field>
<field name="holiday_status_id" ref="holiday_status_cl"/>
<field eval="time.strftime('%Y-%m-04')" name="date_from"/>
<field eval="time.strftime('%Y-%m-10')" name="date_to"/>
<field eval="time.strftime('%Y-%m-04')" name="request_date_from"/>
<field eval="time.strftime('%Y-%m-10')" name="request_date_to"/>
<field name="employee_id" ref="hr.employee_al"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_al'))]"/>
</record>
<function model="hr.leave" name="action_validate">
<value eval="ref('hr_holidays.hr_holidays_cl_al')"/>
</function>
<record id="hr_holidays_sl_al" model="hr.leave">
<field name="name">Dentist appointment</field>
<field name="holiday_status_id" ref="holiday_status_sl"/>
<field eval="(datetime.now()+relativedelta(months=1, day=17, weekday=0)).strftime('%Y-%m-%d 04:00:00')" name="date_from"/>
<field eval="(datetime.now()+relativedelta(months=1, day=17, weekday=0) + relativedelta(weekday=2)).strftime('%Y-%m-%d 20:00:00')" name="date_to"/>
<field eval="(datetime.now()+relativedelta(months=1, day=17, weekday=0)).strftime('%Y-%m-%d 04:00:00')" name="request_date_from"/>
<field eval="(datetime.now()+relativedelta(months=1, day=17, weekday=0) + relativedelta(weekday=2)).strftime('%Y-%m-%d 20:00:00')" name="request_date_to"/>
<field name="employee_id" ref="hr.employee_al"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_al'))]"/>
<field name="state">confirm</field>
</record>
<function model="hr.leave" name="action_validate">
<value eval="ref('hr_holidays.hr_holidays_sl_al')"/>
</function>
<!-- ++++++++++++++++++++++ Anita Oliver ++++++++++++++++++++++ -->
<record id="hr_holidays_allocation_cl_mit" model="hr.leave.allocation">
<field name="name">Paid Time Off for Anita Oliver</field>
<field name="holiday_status_id" ref="holiday_status_cl"/>
<field name="number_of_days">20</field>
<field name="employee_id" ref="hr.employee_mit"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_mit'))]"/>
<field name="state">confirm</field>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<function model="hr.leave.allocation" name="action_validate">
<value eval="[ref('hr_holidays_allocation_cl_mit')]"/>
</function>
<record id="hr_holidays_vc_mit" model="hr.leave.allocation">
<field name="name">Compliance Training</field>
<field name="holiday_status_id" ref="holiday_status_training"/>
<field name="number_of_days">7</field>
<field name="state">confirm</field>
<field name="employee_id" ref="hr.employee_mit"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_mit'))]"/>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<!-- leave request -->
<record id="hr_holidays_cl_mit" model="hr.leave">
<field name="name">Trip to Paris</field>
<field name="holiday_status_id" ref="holiday_status_cl"/>
<field eval="time.strftime('%Y-%m-18')" name="date_from"/>
<field eval="time.strftime('%Y-%m-24')" name="date_to"/>
<field eval="time.strftime('%Y-%m-18')" name="request_date_from"/>
<field eval="time.strftime('%Y-%m-24')" name="request_date_to"/>
<field name="employee_id" ref="hr.employee_mit"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_mit'))]"/>
</record>
<function model="hr.leave" name="action_validate">
<value eval="ref('hr_holidays.hr_holidays_cl_mit')"/>
</function>
<record id="hr_holidays_cl_mit_2" model="hr.leave">
<field name="name">Trip</field>
<field name="holiday_status_id" ref="holiday_status_cl"/>
<field eval="(datetime.now() + relativedelta(day=5, weekday=0)).strftime('%Y-%m-%d 04:00:00')" name="date_from"/>
<field eval="(datetime.now() + relativedelta(day=5, weekday=0) + relativedelta(weekday=2)).strftime('%Y-%m-%d 20:00:00')" name="date_to"/>
<field eval="(datetime.now() + relativedelta(day=5, weekday=0)).strftime('%Y-%m-%d 04:00:00')" name="request_date_from"/>
<field eval="(datetime.now() + relativedelta(day=5, weekday=0) + relativedelta(weekday=2)).strftime('%Y-%m-%d 20:00:00')" name="request_date_to"/>
<field name="employee_id" ref="hr.employee_mit"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_mit'))]"/>
<field name="state">confirm</field>
</record>
<function model="hr.leave" name="action_approve">
<value eval="ref('hr_holidays.hr_holidays_cl_mit_2')"/>
</function>
<!-- ++++++++++++++++++++++ Marc Demo ++++++++++++++++++++++ -->
<record id="hr_holidays_allocation_cl_qdp" model="hr.leave.allocation">
<field name="name">Paid Time Off for Marc Demo</field>
<field name="holiday_status_id" ref="holiday_status_cl"/>
<field name="number_of_days">20</field>
<field name="employee_id" ref="hr.employee_qdp"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_qdp'))]"/>
<field name="state">confirm</field>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<record id="hr_holidays_vc_qdp" model="hr.leave.allocation">
<field name="name">Time Management Training</field>
<field name="holiday_status_id" ref="holiday_status_training"/>
<field name="number_of_days">7</field>
<field name="employee_id" ref="hr.employee_qdp"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_qdp'))]"/>
<field name="state">confirm</field>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<function model="hr.leave.allocation" name="action_validate">
<value eval="[ref('hr_holidays.hr_holidays_allocation_cl_qdp'), ref('hr_holidays.hr_holidays_vc_qdp')]"/>
</function>
<!-- leave request -->
<record id="hr_holidays_cl_qdp" model="hr.leave">
<field name="name">Sick day</field>
<field name="holiday_status_id" ref="holiday_status_sl"/>
<field eval="(datetime.now()+relativedelta(months=1, day=3, weekday=0)).strftime('%Y-%m-%d 01:00:00')" name="date_from"/>
<field eval="(datetime.now()+relativedelta(months=1, day=3, weekday=0) + relativedelta(weekday=2)).strftime('%Y-%m-%d 23:00:00')" name="date_to"/>
<field eval="(datetime.now()+relativedelta(months=1, day=3, weekday=0)).strftime('%Y-%m-%d 01:00:00')" name="request_date_from"/>
<field eval="(datetime.now()+relativedelta(months=1, day=3, weekday=0) + relativedelta(weekday=2)).strftime('%Y-%m-%d 23:00:00')" name="request_date_to"/>
<field name="employee_id" ref="hr.employee_qdp"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_qdp'))]"/>
<field name="state">confirm</field>
</record>
<function model="hr.leave" name="action_validate">
<value eval="ref('hr_holidays.hr_holidays_cl_qdp')"/>
</function>
<record id="hr_holidays_sl_qdp" model="hr.leave">
<field name="name">Sick day</field>
<field name="holiday_status_id" ref="holiday_status_sl"/>
<field eval="(datetime.now() + relativedelta(day=1, weekday=0)).strftime('%Y-%m-%d 01:00:00')" name="date_from"/>
<field eval="(datetime.now() + relativedelta(day=1, weekday=0) + relativedelta(days=2)).strftime('%Y-%m-%d 23:00:00')" name="date_to"/>
<field eval="(datetime.now() + relativedelta(day=1, weekday=0)).strftime('%Y-%m-%d 01:00:00')" name="request_date_from"/>
<field eval="(datetime.now() + relativedelta(day=1, weekday=0) + relativedelta(days=2)).strftime('%Y-%m-%d 23:00:00')" name="request_date_to"/>
<field name="employee_id" ref="hr.employee_qdp"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_qdp'))]"/>
<field name="state">confirm</field>
</record>
<function model="hr.leave" name="action_validate">
<value eval="ref('hr_holidays.hr_holidays_sl_qdp')"/>
</function>
<!-- ++++++++++++++++++++++ Audrey Peterson ++++++++++++++++++++++ -->
<record id="hr_holidays_allocation_cl_fpi" model="hr.leave.allocation">
<field name="name">Paid Time Off for Audrey Peterson</field>
<field name="holiday_status_id" ref="holiday_status_cl"/>
<field name="number_of_days">20</field>
<field name="employee_id" ref="hr.employee_fpi"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_fpi'))]"/>
<field name="state">confirm</field>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<function model="hr.leave.allocation" name="action_validate">
<value eval="[ref('hr_holidays.hr_holidays_allocation_cl_fpi')]"/>
</function>
<record id="hr_holidays_vc_fpi" model="hr.leave.allocation">
<field name="name">Consulting Training</field>
<field name="holiday_status_id" ref="holiday_status_training"/>
<field name="number_of_days">7</field>
<field name="employee_id" ref="hr.employee_fpi"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_fpi'))]"/>
<field name="state">confirm</field>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<!-- ++++++++++++++++++++++ Olivia ++++++++++++++++++++++ -->
<record id="hr_holidays_allocation_cl_vad" model="hr.leave.allocation">
<field name="name">Paid Time Off for Olivia</field>
<field name="holiday_status_id" ref="holiday_status_cl"/>
<field name="number_of_days">20</field>
<field name="employee_id" ref="hr.employee_niv"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_niv'))]"/>
<field name="state">confirm</field>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<record id="hr_holidays_vc_vad" model="hr.leave.allocation">
<field name="name">Software Development Training</field>
<field name="holiday_status_id" ref="holiday_status_training"/>
<field name="number_of_days">5</field>
<field name="employee_id" ref="hr.employee_niv"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_niv'))]"/>
<field name="state">confirm</field>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<function model="hr.leave.allocation" name="action_validate">
<value eval="[ref('hr_holidays.hr_holidays_allocation_cl_vad'), ref('hr_holidays.hr_holidays_vc_vad')]"/>
</function>
<record id="hr_holidays_cl_vad" model="hr.leave">
<field name="name">Trip to London</field>
<field name="holiday_status_id" ref="holiday_status_cl"/>
<field eval="time.strftime('%Y-%m-09')" name="date_from"/>
<field eval="time.strftime('%Y-%m-16')" name="date_to"/>
<field eval="time.strftime('%Y-%m-09')" name="request_date_from"/>
<field eval="time.strftime('%Y-%m-16')" name="request_date_to"/>
<field name="employee_id" ref="hr.employee_niv"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_niv'))]"/>
<field name="state">confirm</field>
</record>
<function model="hr.leave" name="action_validate">
<value eval="ref('hr_holidays.hr_holidays_cl_vad')"/>
</function>
<record id="hr_holidays_sl_vad" model="hr.leave">
<field name="name">Doctor Appointment</field>
<field name="holiday_status_id" ref="holiday_status_sl"/>
<field eval="(datetime.now() + relativedelta(day=25, weekday=0)).strftime('%Y-%m-%d 01:00:00')" name="date_from"/>
<field eval="(datetime.now() + relativedelta(day=25, weekday=0) + relativedelta(weekday=2)).strftime('%Y-%m-%d 23:00:00')" name="date_to"/>
<field eval="(datetime.now() + relativedelta(day=25, weekday=0)).strftime('%Y-%m-%d 01:00:00')" name="request_date_from"/>
<field eval="(datetime.now() + relativedelta(day=25, weekday=0) + relativedelta(weekday=2)).strftime('%Y-%m-%d 23:00:00')" name="request_date_to"/>
<field name="employee_id" ref="hr.employee_niv"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_niv'))]"/>
<field name="state">confirm</field>
</record>
<function model="hr.leave" name="action_validate">
<value eval="ref('hr_holidays.hr_holidays_sl_vad')"/>
</function>
<!-- ++++++++++++++++++++++ Kim ++++++++++++++++++++++ -->
<record id="hr_holidays_allocation_cl_kim" model="hr.leave.allocation">
<field name="name">Paid Time Off for Kim</field>
<field name="holiday_status_id" ref="holiday_status_cl"/>
<field name="number_of_days">20</field>
<field name="employee_id" ref="hr.employee_jve"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_jve'))]"/>
<field name="state">confirm</field>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<record id="hr_holidays_vc_kim" model="hr.leave.allocation">
<field name="name">Onboarding Training</field>
<field name="holiday_status_id" ref="holiday_status_training"/>
<field name="number_of_days">5</field>
<field name="state">confirm</field>
<field name="employee_id" ref="hr.employee_jve"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_jve'))]"/>
<field name="date_from" eval="time.strftime('%Y-1-1')"/>
<field name="date_to" eval="time.strftime('%Y-12-31')"/>
</record>
<!-- leave request -->
<record id="hr_holidays_sl_kim" model="hr.leave">
<field name="name">Dentist appointment</field>
<field name="holiday_status_id" ref="holiday_status_sl"/>
<field eval="(datetime.now()+relativedelta(months=1, day=1, weekday=0)).strftime('%Y-%m-%d 01:00:00')" name="date_from"/>
<field eval="(datetime.now()+relativedelta(months=1, day=1, weekday=0)).strftime('%Y-%m-%d 23:00:00')" name="date_to"/>
<field eval="(datetime.now()+relativedelta(months=1, day=1, weekday=0)).strftime('%Y-%m-%d 01:00:00')" name="request_date_from"/>
<field eval="(datetime.now()+relativedelta(months=1, day=1, weekday=0)).strftime('%Y-%m-%d 23:00:00')" name="request_date_to"/>
<field name="employee_id" ref="hr.employee_jve"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_jve'))]"/>
<field name="state">confirm</field>
</record>
<function model="hr.leave" name="action_validate">
<value eval="ref('hr_holidays.hr_holidays_sl_kim')"/>
</function>
<record id="hr_holidays_sl_kim_2" model="hr.leave">
<field name="name">Second dentist appointment</field>
<field name="holiday_status_id" ref="holiday_status_sl"/>
<field eval="(datetime.now()+relativedelta(months=4, day=1, weekday=2)).strftime('%Y-%m-%d 01:00:00')" name="date_from"/>
<field eval="(datetime.now()+relativedelta(months=4, day=1, weekday=2)).strftime('%Y-%m-%d 23:00:00')" name="date_to"/>
<field eval="(datetime.now()+relativedelta(months=4, day=1, weekday=2)).strftime('%Y-%m-%d 01:00:00')" name="request_date_from"/>
<field eval="(datetime.now()+relativedelta(months=4, day=1, weekday=2)).strftime('%Y-%m-%d 23:00:00')" name="request_date_to"/>
<field name="employee_id" ref="hr.employee_jve"/>
<field name="employee_ids" eval="[(4, ref('hr.employee_jve'))]"/>
<field name="state">confirm</field>
</record>
<function model="hr.leave" name="action_validate">
<value eval="ref('hr_holidays.hr_holidays_sl_kim_2')"/>
</function>
<!-- Public time off -->
<record id="resource_public_time_off_1" model="resource.calendar.leaves">
<field name="name">Public Time Off</field>
<field name="company_id" ref="base.main_company"/>
<field name="calendar_id" ref="resource.resource_calendar_std"/>
<field name="date_from" eval="(datetime.today() + relativedelta(days=+8)).strftime('%Y-%m-%d 05:00:00')"></field>
<field name="date_to" eval="(datetime.today() + relativedelta(days=+8)).strftime('%Y-%m-%d 17:00:00')"></field>
</record>
<!-- Stress day -->
<record id="hr_leave_stress_day_1" model="hr.leave.stress.day">
<field name="name">Company Celebration</field>
<field name="company_id" ref="base.main_company"/>
<field name="start_date" eval="(datetime.today() + relativedelta(days=+7)).strftime('%Y-%m-%d 07:00:00')"></field>
<field name="end_date" eval="(datetime.today() + relativedelta(days=+7)).strftime('%Y-%m-%d 16:00:00')"></field>
<field name="color">9</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,14 @@
<?xml version='1.0' encoding='UTF-8' ?>
<odoo>
<record id="hr_leave_allocation_cron_accrual" model="ir.cron">
<field name="name">Accrual Time Off: Updates the number of time off</field>
<field name="model_id" ref="model_hr_leave_allocation"/>
<field name="state">code</field>
<field name="code">model._update_accrual()</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="numbercall">-1</field>
<field name="doall" eval="True"/>
</record>
</odoo>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Leave specific activities -->
<record id="mail_act_leave_approval" model="mail.activity.type">
<field name="name">Time Off Approval</field>
<field name="icon">fa-sun-o</field>
<field name="res_model">hr.leave</field>
</record>
<record id="mail_act_leave_second_approval" model="mail.activity.type">
<field name="name">Time Off Second Approve</field>
<field name="icon">fa-sun-o</field>
<field name="res_model">hr.leave</field>
</record>
<!-- Leave specific activities -->
<record id="mail_act_leave_allocation_approval" model="mail.activity.type">
<field name="name">Allocation Approval</field>
<field name="icon">fa-sun-o</field>
<field name="res_model">hr.leave.allocation</field>
</record>
<record id="mail_act_leave_allocation_second_approval" model="mail.activity.type">
<field name="name">Allocation Second Approve</field>
<field name="icon">fa-sun-o</field>
<field name="res_model">hr.leave.allocation</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Holidays-related subtypes for messaging / Chatter -->
<record id="mt_leave" model="mail.message.subtype">
<field name="name">Time Off</field>
<field name="res_model">hr.leave</field>
<field name="description">Time Off Request</field>
</record>
<record id="mt_leave_home_working" model="mail.message.subtype">
<field name="name">Home Working</field>
<field name="res_model">hr.leave</field>
<field name="description">Home Working</field>
</record>
<record id="mt_leave_sick" model="mail.message.subtype">
<field name="name">Sick Time Off</field>
<field name="res_model">hr.leave</field>
<field name="description">Sick Time Off</field>
</record>
<record id="mt_leave_unpaid" model="mail.message.subtype">
<field name="name">Unpaid Time Off</field>
<field name="res_model">hr.leave</field>
<field name="description">Unpaid Time Off</field>
</record>
<!-- Allocation-related subtypes for messaging / Chatter -->
<record id="mt_leave_allocation" model="mail.message.subtype">
<field name="name">Allocation</field>
<field name="res_model">hr.leave.allocation</field>
<field name="description">Allocation Request</field>
</record>
</data>
</odoo>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="paperformat_hrsummary" model="report.paperformat">
<field name="name">Time Off Summary</field>
<field name="default" eval="True"/>
<field name="format">custom</field>
<field name="page_height">297</field>
<field name="page_width">210</field>
<field name="orientation">Landscape</field>
<field name="margin_top">30</field>
<field name="margin_bottom">23</field>
<field name="margin_left">5</field>
<field name="margin_right">5</field>
<field name="header_line" eval="False"/>
<field name="header_spacing">20</field>
<field name="dpi">90</field>
</record>
</odoo>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more