[MIG] web_time_range_menu_custom: Migration to 17.0

pull/3055/head
Carlos Roca 2024-11-26 12:57:37 +01:00
parent eea3edf093
commit 3fc8c83fe6
12 changed files with 51 additions and 63 deletions

View File

@ -7,7 +7,7 @@ Web Time Range Menu Custom
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a7ec150e03ed025658f5fa8b99182db4462ec123cc7ea6a4de38c4e8082059b7
!! source digest: sha256:b8f576a232543e626ea63750f61ea280b120dc0aa96313e37982039805a68eb6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@ -80,10 +80,10 @@ Authors
Contributors
------------
- `Tecnativa <https://www.tecnativa.com>`__:
- `Tecnativa <https://www.tecnativa.com>`__:
- Alexandre D. Díaz
- Carlos Roca
- Alexandre D. Díaz
- Carlos Roca
Maintainers
-----------

View File

@ -2,7 +2,7 @@
{
"name": "Web Time Range Menu Custom",
"version": "16.0.1.0.0",
"version": "17.0.1.0.0",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/web",
@ -11,7 +11,11 @@
"auto_install": False,
"assets": {
"web.assets_backend": [
"/web_time_range_menu_custom/static/src/js/*.esm.js",
(
"after",
"/web/static/src/search/utils/dates.js",
"/web_time_range_menu_custom/static/src/js/*.esm.js",
),
"/web_time_range_menu_custom/static/src/scss/*.scss",
"/web_time_range_menu_custom/static/src/xml/*.xml",
],

View File

@ -17,70 +17,70 @@ msgstr ""
"X-Generator: Weblate 4.17\n"
#. module: web_time_range_menu_custom
#. openerp-web
#. odoo-javascript
#: code:addons/web_time_range_menu_custom/static/src/xml/date_selector.xml:0
#, python-format
msgid "Add"
msgstr "Añadir"
#. module: web_time_range_menu_custom
#. openerp-web
#. odoo-javascript
#: code:addons/web_time_range_menu_custom/static/src/xml/date_selector.xml:0
#, python-format
msgid "Custom period"
msgstr "Período personalizado"
#. module: web_time_range_menu_custom
#. openerp-web
#. odoo-javascript
#: code:addons/web_time_range_menu_custom/static/src/xml/date_selector.xml:0
#, python-format
msgid "Day"
msgstr "Día"
#. module: web_time_range_menu_custom
#. openerp-web
#. odoo-javascript
#: code:addons/web_time_range_menu_custom/static/src/xml/date_selector.xml:0
#, python-format
msgid "Month"
msgstr "Mes"
#. module: web_time_range_menu_custom
#. openerp-web
#. odoo-javascript
#: code:addons/web_time_range_menu_custom/static/src/xml/date_selector.xml:0
#, python-format
msgid "Week"
msgstr "Semana"
#. module: web_time_range_menu_custom
#. openerp-web
#. odoo-javascript
#: code:addons/web_time_range_menu_custom/static/src/xml/date_selector.xml:0
#, python-format
msgid "Year"
msgstr "Año"
#. module: web_time_range_menu_custom
#. openerp-web
#. odoo-javascript
#: code:addons/web_time_range_menu_custom/static/src/xml/date_selector.xml:0
#, python-format
msgid "day"
msgstr ""
#. module: web_time_range_menu_custom
#. openerp-web
#. odoo-javascript
#: code:addons/web_time_range_menu_custom/static/src/xml/date_selector.xml:0
#, python-format
msgid "month"
msgstr ""
#. module: web_time_range_menu_custom
#. openerp-web
#. odoo-javascript
#: code:addons/web_time_range_menu_custom/static/src/xml/date_selector.xml:0
#, python-format
msgid "week"
msgstr ""
#. module: web_time_range_menu_custom
#. openerp-web
#. odoo-javascript
#: code:addons/web_time_range_menu_custom/static/src/xml/date_selector.xml:0
#, python-format
msgid "year"

View File

@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"

View File

@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a7ec150e03ed025658f5fa8b99182db4462ec123cc7ea6a4de38c4e8082059b7
!! source digest: sha256:b8f576a232543e626ea63750f61ea280b120dc0aa96313e37982039805a68eb6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/17.0/web_time_range_menu_custom"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_time_range_menu_custom"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Extend period and comparison period options for the date and datetime

View File

@ -1,13 +0,0 @@
/** @odoo-module **/
/* Copyright 2024 Tecnativa - Carlos Roca
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) */
import {ComparisonMenu} from "@web/search/comparison_menu/comparison_menu";
import {DropdownItemCustomPeriod} from "./date_selector.esm";
import {patch} from "@web/core/utils/patch";
patch(ComparisonMenu, "web_time_range_menu_custom.FilterMenu", {
components: {
...ComparisonMenu.components,
DropdownItemCustomPeriod,
},
});

View File

@ -40,7 +40,7 @@ Object.assign(dates.PER_YEAR, {
const _getSetParam = dates.getSetParam;
// Patch of functions defined before
patch(dates, "patch dates", {
patch(dates, {
/*
* Redefine function to avoid the exclusion of days and weeks.
*/

View File

@ -1,13 +1,13 @@
/** @odoo-module **/
/* Copyright 2024 Tecnativa - Carlos Roca
/* Copyright 2022 Tecnativa - Carlos Roca
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) */
import {FilterMenu} from "@web/search/filter_menu/filter_menu";
import {DropdownItemCustomPeriod} from "./date_selector.esm";
import {patch} from "@web/core/utils/patch";
import {SearchBarMenu} from "@web/search/search_bar_menu/search_bar_menu";
import {DropdownItemCustomPeriod} from "./date_selector.esm";
patch(FilterMenu, "web_time_range_menu_custom.FilterMenu", {
patch(SearchBarMenu, {
components: {
...FilterMenu.components,
...SearchBarMenu.components,
DropdownItemCustomPeriod,
},
});

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>