OdooWiki OCA HUB

Calendar Color Field

web_calendar_color_field folder_open OCA/web open_in_new
Web License: AGPL-3

This is a technical module. It doesn't do anything on its own.

Odoo introduced a mechanism to set the desired color for a calendar filter, through the field's color attribute.

Unfortunately, this only works for filters, but not if we want to use the calendar's color attribute.

This module makes the appropiate changes so that the filter's color is used, if available.

auto_awesome What this module does

AI-generated from the code · Odoo 14.0

This technical module changes how calendar events get their colors when a related record (like a customer or project) is used as the color field. It makes the calendar use the color defined on the filter instead of a random color based on the record ID.

This is a technical module that does not add any new menus or screens. It changes the behavior of the calendar view in Odoo.

Normally, when you set a many2one field (for example, a customer) as the color attribute of a calendar, Odoo assigns random colors based on the record ID. This module makes the calendar use the color defined on the filter instead, if that filter has a color field configured.

  • It only applies when the field used for coloring is also added to the calendar filters and a color field is defined on that filter.
  • It loads the color values from the related model once and stores them in memory, so it does not query the database repeatedly.
  • It does not change the model color, allowing filters to generate their own colors.

The module touches the calendar model in the web client (web.CalendarModel). It does not add any business rules, checks, or automatic actions. It is purely a display improvement for calendar views.

Depends on

web

Required by other modules

Text generated by AI (DeepSeek) from reading the Odoo 14.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

OCA documentation · Odoo 14.0

Set a color attribute value on any many2one calendar field set as filter and set the calendar's color attribute to use the same many2one field.

Example:

<calendar color="category_id">
    <field name="category_id" filter="1" color="kanban_color"/>
</calendar>
  • category_id is a Many2one field in your record.
  • kanban_color is an integer field in your category record.

No verified information in OCA: Installation, Configuration.

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.