Skip to content
Snippets Groups Projects
Commit da56e3e7 authored by Nicolas Lempereur's avatar Nicolas Lempereur
Browse files

[FIX] web: typo calendar highlight -> ok now


Adapt calendar highlight option (that "highlight" event linked to the
record we come from) to current JS framework data structures.

note: this changeset also fixes the original `_compute_is_highlighted`
that was would trigger CacheMiss errors, and also adds back the CSS for
highlighting that was lost between 12.0 and 13.0 version.

opw-2131494
closes #40791

closes odoo/odoo#40940

X-original-commit: 77070b27f642ee1ceb76def60fb9e6c511ee66ec
Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent 50c2ecbc
No related branches found
No related tags found
No related merge requests found
......@@ -757,6 +757,9 @@ class Meeting(models.Model):
event.is_highlighted = True
else:
event.is_highlighted = False
else:
for event in self:
event.is_highlighted = False
name = fields.Char('Meeting Subject', required=True, states={'done': [('readonly', True)]})
state = fields.Selection([('draft', 'Unconfirmed'), ('open', 'Confirmed')], string='Status', readonly=True, tracking=True, default='draft')
......
......@@ -263,6 +263,7 @@
<field name="attendee_status"/>
<field name="partner_id"/>
<field name="partner_ids" widget="many2many_tags_avatar" write_model="calendar.contacts" write_field="partner_id" avatar_field="image_128"/>
<field name="is_highlighted" invisible="1"/>
<field name="description"/>
</calendar>
</field>
......
......@@ -588,6 +588,15 @@ $o-cw-filter-avatar-size: 20px;
.fc-event.o_calendar_color_#{$i} {
border-color: $color;
color: darken($color, 35%);
opacity: 0.8;
&.o_event_hightlight {
opacity: 1;
.fc-content {
font-weight: bold;
}
}
.fc-bg {
background: mix($color, white);
......
......@@ -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 and record.is_highlighted.value ? '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="#{!event.color_index ? 'text-white' : ''} #{record.is_highlighted ? 'o_event_hightlight' : ''} #{typeof color === 'number' ? _.str.sprintf('o_calendar_color_%s', color) : ''}">
<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