Repository
OCA/calendar · module folder · Try on Runboat
Module version
1.0.0
Category
HR/Calendar
Folder size
0.1 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/calendar
Last tracking update
2026-08-07 09:06:34
Authors
Camptocamp, Odoo Community Association (OCA), Fekete Mihai (Forest and Biomass Services Romania), Tecnativa, Michael Telahun Makonnen, Druidoo
Maintainers
Camptocamp, Odoo Community Association (OCA), Fekete Mihai (Forest and Biomass Services Romania), Tecnativa, Michael Telahun Makonnen, Druidoo
Committers
Weblate, Denis Leemann, OCA-git-bot, oca-ci
Odoo dependencies
odoo/odoo:
- web
- bus
Python dependencies
openupgradelib
System dependencies
None
Required by
hr_holidays_public
Description
This module handles public holidays.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
calendar_public_holiday_next_year_view Create Next Year Public Holidays calendar.public.holiday.next.year form New
view_calendar_public_holiday_form calendar.public.holiday.form calendar.public.holiday form New
view_calendar_public_holiday_list calendar.public.holiday.list calendar.public.holiday list New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (3)

New fields (3)
  • country_id Many2one → res.country
    args: 'res.country', 'Country'
  • line_ids One2many → calendar.public.holiday.line
    args: 'calendar.public.holiday.line', 'public_holiday_id', 'Holiday Dates'
  • year Integer
    default=<expr> required=True args: 'Calendar Year'
Public methods (2)
  • get_holidays_list(self, year=None, start_dt=None, end_dt=None, partner_id=None)
    @api.model
    Returns recordset of calendar.public.holiday.line for the specified year and employee :param year: year as string (optional if start_dt and end_dt defined) :param start_dt: start_dt as date :param end_dt: end_dt as date :param partner_id: ID of the partner :return: recordset of calendar.public.holiday.line
  • is_public_holiday(self, selected_date, partner_id=None)
    @api.model
    Returns True if selected_date is a public holiday for the employee :param selected_date: datetime object :param partner_id: ID of the partner :return: bool

New fields (6)
  • date Date
    required=True
  • meeting_id Many2one → calendar.event
    copy=False string='Meeting' args: 'calendar.event'
  • name Char
    required=True
  • public_holiday_id Many2one → calendar.public.holiday
    ondelete='cascade' required=True args: 'calendar.public.holiday', 'Calendar Year'
  • state_ids Many2many → res.country.state
    args: 'res.country.state', 'public_holiday_state_rel', 'public_holiday_line_id', 'state_id', 'Related States'
  • variable_date Boolean
    default=True args: 'Date may change'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)

New fields (2)
  • public_holiday_ids Many2many → calendar.public.holiday
    comodel_name='calendar.public.holiday' help='Select the public holidays to use as template. If not set, latest public holidays of each country will be used. Only the last templates of each country for each year will be taken into account (If you select templates from 2012 and 2015, only the templates from 2015 will be taken into account.' string='Templates'
  • year Integer
    help='Year for which you want to create the public holidays. By default, the year following the template.'
Public methods (1)
  • create_public_holidays(self)

Loading…