OdooWiki OCA HUB

Multi-week calendars

resource_multi_week_calendar folder_open OCA/hr open_in_new
Hidden License: AGPL-3

Allow a calendar to alternate between multiple weeks.

An implementation of this functionality exists in Odoo's resource module since version 13. In Odoo's implementation, you can only alternate between two weeks. Furthermore, the implementation is more than a little wonky.

The advantage of this module over the implementation in resource is that you can alternate between more than two weeks. The implementation is (hopefully) better.

The downside of adopting this module is that all modules which interact with the week-alternating functionality of resource must be adapted to be compatible with this module. At the time of writing (2024-07-29), the only Odoo module which does this is hr_holidays.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Lets you set up a working time calendar that rotates between more than two weekly schedules, instead of only alternating between two. You define a main working time with several alternating weeks and Odoo automatically picks the right week for each date.

This module extends the Working Time (resource.calendar) screen so a calendar can alternate between several different weekly schedules, not just two.

On a working time form you get a new "Alternating Working Times" list where you add the weekly schedules that should rotate. The first one is the "Main Working Time". You also set a "Date of First Week": the week containing that date becomes week 1, and the following weeks rotate in the order you arranged in the list (you can drag rows to reorder them).

Odoo shows you which week is currently active (current week number and the matching alternating working time). The standard "switch calendar type" button and the working-hours tab are hidden for calendars that have alternating weeks, and the hours-per-day field is hidden on the main calendar.

A rule prevents a working time from being both a main calendar and an alternating one at the same time, and prevents nesting more than one level deep. When you duplicate a calendar, the copy is placed at the end of the rotation.

The module also changes how attendance intervals are computed: for a multi-week calendar, Odoo splits the requested period into weeks and uses the correct weekly schedule for each week. In the Working Time list view there is a new filter "Only Main Working Times", and that filter is applied by default when opening the Working Times menu.

Depends on

resource
Models and fields (1)
  • resource.calendar · extends an existing modelweek_number, is_multi_week, week_sequence, child_calendar_ids (Alternating Working Times), parent_calendar_id (Main Working Time), current_week_number, multi_week_epoch_date (Date of First Week), multi_week_calendar_ids, current_multi_week_calendar_id

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

terminal Installation and usage

No verified information

Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.