Skip to content

Commit

Permalink
Merge PR #2993 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Nov 20, 2024
2 parents 850789e + 7a9d542 commit 48ce06d
Show file tree
Hide file tree
Showing 21 changed files with 1,380 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setup/web_time_range_menu_custom/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
100 changes: 100 additions & 0 deletions web_time_range_menu_custom/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
==========================
Web Time Range Menu Custom
==========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a7d5190a01dc1568ba62760ae6498f4385a83f98164c3012312979ca764ff49f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/16.0/web_time_range_menu_custom
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_time_range_menu_custom
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Extend period and comparison period options for the date and datetime fields filted menu
adding a new option called "Custom Period".

**Table of contents**

.. contents::
:local:

Usage
=====

To see this module working:

#. Navigate to any menu that supports date-based filters.
#. Open **Custom period** tab.
#. Add new date filter with the provided options.

.. image:: https://raw.githubusercontent.com/web_time_range_menu_custom/static/src/description/custom_period_option.png
:alt: Custom Period Option

For the pivots, on the comparison tab you can see the same option to make the
comparison with the provided filter, taking th reference from the set filter.

**Note:** For "days," it functions as a range; for example, "Last 7 days" returns the
period from 7 days ago up to today. However, for other options, it provides the
range for the selected period. For instance, "Last 1 month" returns the period from
the first day of the previous month to the last day of the previous month.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_time_range_menu_custom%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Tecnativa

Contributors
~~~~~~~~~~~~

* `Tecnativa <https://www.tecnativa.com>`__:

* Alexandre D. Díaz
* Carlos Roca

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/web <https://github.com/OCA/web/tree/16.0/web_time_range_menu_custom>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions web_time_range_menu_custom/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
19 changes: 19 additions & 0 deletions web_time_range_menu_custom/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

{
"name": "Web Time Range Menu Custom",
"version": "16.0.1.0.0",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/web",
"depends": ["web"],
"installable": True,
"auto_install": False,
"assets": {
"web.assets_backend": [
"/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",
],
},
}
87 changes: 87 additions & 0 deletions web_time_range_menu_custom/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_time_range_menu_custom
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-11-19 19:33+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: web_time_range_menu_custom
#. openerp-web
#: 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
#: 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
#: 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
#: 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
#: 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
#: 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
#: 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
#: 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
#: 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
#: code:addons/web_time_range_menu_custom/static/src/xml/date_selector.xml:0
#, python-format
msgid "year"
msgstr ""
84 changes: 84 additions & 0 deletions web_time_range_menu_custom/i18n/web_time_range_menu_custom.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * web_time_range_menu_custom
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: web_time_range_menu_custom
#. openerp-web
#: code:addons/web_time_range_menu_custom/static/src/xml/date_selector.xml:0
#, python-format
msgid "Add"
msgstr ""

#. module: web_time_range_menu_custom
#. openerp-web
#: code:addons/web_time_range_menu_custom/static/src/xml/date_selector.xml:0
#, python-format
msgid "Custom period"
msgstr ""

#. module: web_time_range_menu_custom
#. openerp-web
#: 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
#: 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
#: 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
#: code:addons/web_time_range_menu_custom/static/src/xml/date_selector.xml:0
#, python-format
msgid "Year"
msgstr ""

#. module: web_time_range_menu_custom
#. openerp-web
#: 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
#: 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
#: 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
#: code:addons/web_time_range_menu_custom/static/src/xml/date_selector.xml:0
#, python-format
msgid "year"
msgstr ""
4 changes: 4 additions & 0 deletions web_time_range_menu_custom/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* `Tecnativa <https://www.tecnativa.com>`__:

* Alexandre D. Díaz
* Carlos Roca
2 changes: 2 additions & 0 deletions web_time_range_menu_custom/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Extend period and comparison period options for the date and datetime fields filted menu
adding a new option called "Custom Period".
16 changes: 16 additions & 0 deletions web_time_range_menu_custom/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
To see this module working:

#. Navigate to any menu that supports date-based filters.
#. Open **Custom period** tab.
#. Add new date filter with the provided options.

.. image:: /web_time_range_menu_custom/static/src/description/custom_period_option.png
:alt: Custom Period Option

For the pivots, on the comparison tab you can see the same option to make the
comparison with the provided filter, taking th reference from the set filter.

**Note:** For "days," it functions as a range; for example, "Last 7 days" returns the
period from 7 days ago up to today. However, for other options, it provides the
range for the selected period. For instance, "Last 1 month" returns the period from
the first day of the previous month to the last day of the previous month.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 48ce06d

Please sign in to comment.