[MIG] web_time_range_menu_custom: Migration to 17.0

This commit is contained in:
Carlos Roca
2024-11-26 12:57:37 +01:00
parent c2de3f5e53
commit f633ffdd15
8 changed files with 35 additions and 47 deletions

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-inherit="web.ComparisonMenu" t-inherit-mode="extension" owl="1">
<xpath expr="//t[@t-foreach='items']" position="after">
<DropdownItemCustomPeriod comparisonItems="items" type="'comparison'" />
</xpath>
</t>
</templates>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="web_time_range_menu_custom.DropdownItemCustomPeriod" owl="1">
<t t-name="web_time_range_menu_custom.DropdownItemCustomPeriod">
<div class="o_menu_item dropdown-item" data-id="__computed__">
<a href="#" role="menuitem" t-on-click="onClickCustomPeriod">
Custom period

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-inherit="web.FilterMenu" t-inherit-mode="extension" owl="1">
<xpath
expr="//t[@t-if='item.options']//t[@t-foreach='item.options']"
position="after"
>
<t t-if="item.type === 'dateFilter'">
<DropdownItemCustomPeriod field="item" type="'filter'" />
</t>
</xpath>
</t>
</templates>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-inherit="web.SearchBarMenu" t-inherit-mode="extension">
<xpath
expr="//t[@t-foreach='filterItems']//AccordionItem//t[@t-foreach='item.options']"
position="after"
>
<DropdownItemCustomPeriod
t-if="item.type == 'dateFilter'"
field="item"
type="'filter'"
/>
</xpath>
<xpath expr="//t[@t-foreach='comparisonItems']" position="after">
<DropdownItemCustomPeriod
comparisonItems="comparisonItems"
type="'comparison'"
/>
</xpath>
</t>
</templates>