summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bouvy <dbo@odoo.com>2019-12-19 13:44:37 +0000
committerDamien Bouvy <dbo@odoo.com>2019-12-19 16:06:04 +0000
commitfebd360ff0be1c812b6bfdfa96a99eae4448b610 (patch)
treed5b4d3449e3501f330c7ae17fb3fc6aa0bd4b0a9
parentadc49e76fcec6490e321d87657eda5cea0293da7 (diff)
[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: 375b34be6ef198753f52a650159edee4d1883006 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
-rw-r--r--addons/web/static/src/xml/web_calendar.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/xml/web_calendar.xml b/addons/web/static/src/xml/web_calendar.xml
index 60ddce6fad1..80b60d2902a 100644
--- a/addons/web/static/src/xml/web_calendar.xml
+++ b/addons/web/static/src/xml/web_calendar.xml
@@ -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>