diff options
| author | mir-odoo <mir@odoo.com> | 2020-12-21 10:25:49 +0000 |
|---|---|---|
| committer | Barad Mahendra <mba@openerp.com> | 2020-12-22 09:21:02 +0000 |
| commit | 7cdd881fe3b3096fad547d365aa677df15c546ec (patch) | |
| tree | 607216516ea0c4d0330a8382144145fae093ffb0 /addons/web | |
| parent | 25760348859f594abb796b5bc7b28f63e298cd53 (diff) | |
[IMP] hr_holidays: Fix the filter collapse issue.
Currently, When go to time off > Managers menu > open 'Time off' menu,
now switch view to calendar view and try to collapse "Time off Type "
filter . it does not collapse due to extra white sapce in the title
and due to that data-target does not set properly.
so in this commit, replace the title's white space with '_' and set the
data-target properly so it works good.
closes odoo/odoo#63636
Taskid: 2413877
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/web')
| -rw-r--r-- | addons/web/static/src/xml/web_calendar.xml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/web/static/src/xml/web_calendar.xml b/addons/web/static/src/xml/web_calendar.xml index c54329e663b..45b03ee266f 100644 --- a/addons/web/static/src/xml/web_calendar.xml +++ b/addons/web/static/src/xml/web_calendar.xml @@ -52,14 +52,15 @@ <t t-name="CalendarView.sidebar.filter"> <t t-set="needCollapse" t-value="widget.filters.length > 2 and widget.title"></t> + <t t-set="collapseTitle" t-value="widget.title and widget.title.split(' ').join('')"></t> <div class="o_calendar_filter"> - <h5 t-if="needCollapse" type="button" data-toggle="collapse" t-attf-data-target="#o_cw_filter_collapse_#{widget.title}" class="d-flex justify-content-between align-items-center"> + <h5 t-if="needCollapse" type="button" data-toggle="collapse" t-attf-data-target="#o_cw_filter_collapse_#{collapseTitle}" class="d-flex justify-content-between align-items-center"> <t t-esc="widget.title"/><i class="o_cw_filter_collapse_icon fa fa-chevron-down"/> </h5> <h5 t-elif="widget.title" t-esc="widget.title"/> - <div t-attf-class="o_calendar_filter_items #{needCollapse ? 'collapse show' : 0}" aria-expanded="true" t-attf-id="o_cw_filter_collapse_#{widget.title}"> + <div t-attf-class="o_calendar_filter_items #{needCollapse ? 'collapse show' : 0}" aria-expanded="true" t-attf-id="o_cw_filter_collapse_#{collapseTitle}"> <t t-foreach="widget.filters" t-as="filter" t-if="filter.display == null || filter.display"> <t t-set="idForLabel" t-value="_.uniqueId('o_calendar_filter_item_')"/> <t t-set="color" t-value="widget.getColor(filter.color_index)"/> |
