[FIX] web: fix calendar quick create removing everything

When an event is currently being inspected by the user, i.e. the popover
is displayed and the user clicks somewhere else on the calendar, we do
not wish to open the quick create menu, only close the popover.
However the code that handled that case was not adapted to the regular
calendar view, only the one from the calendar app and would remove all
data currently displayed.

This commit fixes that issue.

TaskId-2652219

closes odoo/odoo#76939

X-original-commit: ea5c7b643be8c902b03a2ae175c051c479e45ed9
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
William Braeckman
2021-09-22 10:58:55 +00:00
parent 8eee999a01
commit e7097fd6e1
@@ -12,7 +12,7 @@
</div>
<t t-name="calendar-box">
<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'} #{record.is_hatched ? 'o_calendar_hatched o_calendar_hatched_' + (typeof color === 'number' ? color : 1): ''} #{record.is_striked ? 'o_calendar_striked o_calendar_striked_' + (typeof color === 'number' ? color : 1): ''}">
<div t-att-style="typeof color === 'string' ? ('background-color:' + color) + ';' : ''" t-attf-class="o_event #{record.is_highlighted ? 'o_event_hightlight' : ''} #{typeof color === 'number' ? _.str.sprintf('o_calendar_color_%s', color) : 'o_calendar_color_1'} #{record.is_hatched ? 'o_calendar_hatched o_calendar_hatched_' + (typeof color === 'number' ? color : 1): ''} #{record.is_striked ? 'o_calendar_striked o_calendar_striked_' + (typeof color === 'number' ? color : 1): ''}">
<span t-if="showTime" class="fc-time"/>
<div class="o_event_title" t-esc="record.display_name"/>
<div t-if="showLocation and record.location" t-esc="record.location"/>