Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions hr_holidays_leave_type_visibility/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

============================================
HR Holidays Overview - Leave Type Visibility
============================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b44124275ed2bf5071bc6df43a99b4dc2f6d9d9611e7d44cbf369dd782485f07
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr--holidays-lightgray.png?logo=github
:target: https://github.com/OCA/hr-holidays/tree/19.0/hr_holidays_leave_type_visibility
:alt: OCA/hr-holidays
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-holidays-19-0/hr-holidays-19-0-hr_holidays_leave_type_visibility
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/hr-holidays&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

In standard Odoo, the *Time Off Type* of an absence shown in the Time
Off Overview calendar (``hr.leave.report.calendar``) is restricted to
the *Time Off / Officer: Manage all requests* group. Regular employees
can see **that** a colleague is absent, but not **why**.

This addon makes the time off type readable by every internal user, both
in the calendar event label and in the event detail popup, without
granting any approval or write rights on time off requests.

The private time off description remains restricted to Time Off Officers
and to the employee's approver.

**Table of contents**

.. contents::
:local:

Usage
=====

Go to *Time Off > Overview* as a regular employee. Each absence is now
labelled with the employee name followed by the time off type, and the
event detail popup shows the *Time Off Type* field.

To also get a filter/group by time off type in that calendar, install
``hr_holidays_leave_report_calendar_type`` alongside this addon.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr-holidays/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/hr-holidays/issues/new?body=module:%20hr_holidays_leave_type_visibility%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* ForgeFlow

Contributors
------------

- Jasmin Solanki <jasmin.solanki@forgeflow.com>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/hr-holidays <https://github.com/OCA/hr-holidays/tree/19.0/hr_holidays_leave_type_visibility>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions hr_holidays_leave_type_visibility/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
15 changes: 15 additions & 0 deletions hr_holidays_leave_type_visibility/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2026 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "HR Holidays Overview - Leave Type Visibility",
"summary": "Show the time off type in the Time Off Overview to every internal user",
"version": "19.0.1.0.0",
"development_status": "Beta",
"category": "Human Resources/Time Off",
"website": "https://github.com/OCA/hr-holidays",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["hr_holidays"],
}
1 change: 1 addition & 0 deletions hr_holidays_leave_type_visibility/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import hr_leave_report_calendar
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2026 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


class HrLeaveReportCalendar(models.Model):
_inherit = "hr.leave.report.calendar"

# Standard restricts this field to Time Off Officers, which prevents regular
# users from knowing why a colleague is absent. The private description
# remains restricted.
holiday_status_id = fields.Many2one(groups="base.group_user")

@api.depends("employee_id.name", "holiday_status_id", "leave_id")
def _compute_name(self):
for leave in self:
name = leave.employee_id.name or ""
if leave.holiday_status_id:
name += f" {leave.holiday_status_id.name}"
leave.name = f"{name}: {leave.sudo().leave_id.duration_display}"
3 changes: 3 additions & 0 deletions hr_holidays_leave_type_visibility/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions hr_holidays_leave_type_visibility/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Jasmin Solanki \<<jasmin.solanki@forgeflow.com>\>
11 changes: 11 additions & 0 deletions hr_holidays_leave_type_visibility/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
In standard Odoo, the *Time Off Type* of an absence shown in the Time Off
Overview calendar (`hr.leave.report.calendar`) is restricted to the
*Time Off / Officer: Manage all requests* group. Regular employees can see
**that** a colleague is absent, but not **why**.

This addon makes the time off type readable by every internal user, both in
the calendar event label and in the event detail popup, without granting any
approval or write rights on time off requests.

The private time off description remains restricted to Time Off Officers and
to the employee's approver.
3 changes: 3 additions & 0 deletions hr_holidays_leave_type_visibility/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Go to *Time Off > Overview* as a regular employee. Each absence is now
labelled with the employee name followed by the time off type, and the event
detail popup shows the *Time Off Type* field.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading