Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odgovori
2315 Prikazi

I am using Odoo 17, how can I change the meetings/appointments colours on the calendar? They are set by the appointment type but I can’t see anywhere in the appointment or calendar settings to change these. 

Avatar
Opusti

can you please share exact image.

Best Answer
  1. Odoo 17 uses a built-in color field (0–11) for calendar views.
  2. Colors are grouped automatically, but you can set them manually in Python for specific appointment types.
  3. No setting exists in the UI to assign specific colors per type—you’ll need to handle it in code.

@api.model

def create(self, vals):

    if 'appointment_type_id' in vals:

        if vals['appointment_type_id'] == YOUR_TYPE_ID:

            vals['color'] = 2  # Blue

        elif vals['appointment_type_id'] == ANOTHER_TYPE_ID:

            vals['color'] = 4  # Green

    return super().create(vals)

Color codes go from 0 to 11, each representing a different color preset in Odoo.

How It Works:

The calendar view uses the color attribute to apply different background colors.

Odoo assigns colors automatically based on the value of the group field (e.g., appointment_type_id), but you can control this with a small customization.

I Hope It is Useful.

Avatar
Opusti
Best Answer

Same Problem Please help! Following. Were you able to find a solution?

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
nov. 23
2614
0
nov. 23
1648
2
nov. 24
1488
2
dec. 22
2611
0
avg. 21
2773