Skip to content
Snippets Groups Projects
Commit febd360f authored by Damien Bouvy's avatar Damien Bouvy
Browse files

[FIX] web: color for calendar views without `color` attribute


The `color` attribute allows specifying a field by which the calendar
view will color the event entries in the view.

In views where this attribute is not defined, the event was instead
given the `text-white` class, which rendered the event invisible in the
calendar, save for a slight left-border.

This commit just use the 1st color class by default in such cases,
ensuring all events are visible.

opw-2145652

closes odoo/odoo#42200

X-original-commit: 375b34be
Signed-off-by: default avatarDamien Bouvy (dbo) <dbo@odoo.com>
parent adc49e76
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@
</div>
<t t-name="calendar-box">
<div t-att-style="typeof color === 'string' ? ('background-color:' + color) + ';' : ''" t-attf-class="#{!event.color_index ? 'text-white' : ''} #{record.is_highlighted ? 'o_event_hightlight' : ''} #{typeof color === 'number' ? _.str.sprintf('o_calendar_color_%s', color) : ''}">
<div t-att-style="typeof color === 'string' ? ('background-color:' + color) + ';' : ''" t-attf-class="#{record.is_highlighted ? 'o_event_hightlight' : ''} #{typeof color === 'number' ? _.str.sprintf('o_calendar_color_%s', color) : 'o_calendar_color_1'}">
<div class="o_event_title" t-esc="record.display_name"/>
</div>
</t>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment