Date Range
(0)
257

Date Range

FREE

Technical name
date_range
License
LGPL-3
Secure dependencies
N/A
Date Range

Date Range

Mature License: LGPL-3 OCA/server-ux Translate me on Weblate Try me on Runboat

This module lets you define global date ranges that can be used to filter your values in tree views.

It also provides a mixin model for developers that extends the model’s search view so that date ranges can be search as any relational field.

Table of contents

Installation

The addon use the daterange method from postgres. This method is supported as of postgresql 9.2

Configuration

For regular usage, see Usage below. This section is to clarify optional functionality to developers.

To configure a model to use the Many2one style search field, make the model inherit from date.range.search.mixin:

class AccountMove(models.Model):
    _name = "account.move"
    _inherit = ["account.move", "date.range.search.mixin"]

This will make a Period field show up in the search view:

Date range Many2one search field

By default, the mixin works on the date field. If you want the mixin to work on a field with a different name, you can set a property on your model:

_date_range_search_field = "invoice_date"

Usage

To configure this module, you need to:

  • Go to Settings > Technical > Date ranges > Date Range Types where you can create types of date ranges.

    Create a type of date range
  • Go to Settings > Technical > Date ranges > Date Ranges where you can create date ranges.

    Date range creation

    It’s also possible to launch a wizard from the ‘Generate Date Ranges’ menu.

    Date range wizard

    The wizard is useful to generate recurring periods. Set an end date or enter the number of ranges to create.

    Date range wizard result
  • Your date ranges are now available in the search filter for any date or datetime fields

    Date range types are proposed as a filter operator

    Date range type available as filter operator

    Once a type is selected, date ranges of this type are porposed as a filter value

    Date range as filter value

    And the dates specified into the date range are used to filter your result.

    Date range as filter result
  • You can configure date range types with default values for the generation wizard on the Generation tab. In the same tab you can also configure date range types for auto-generation. New ranges for types configured for this are generated by a scheduled task that runs daily.

    Configure a date range for auto-generaton

Bug Tracker

Bugs are tracked on GitHub 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.

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

Credits

Authors

  • ACSONE SA/NV

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

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.

Current maintainer:

lmignon

This module is part of the OCA/server-ux project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

0.0 / 5.0
based on 0 ratings

Python dependencies

Package Version Secured
psycopg2_binary 2.8.6
lxml 4.6.1
odoo_test_helper 2.1.1
python_dateutil 2.9.0.post0
This app has automated tests.

Available languages

Language % translated
Italian / Italiano
100%
Swedish / Svenska
100%
Dutch / Nederlands
98%
French / Français
50%
Chinese (Simplified) / 简体中文
50%
Portuguese / Português
50%
Arabic / الْعَرَبيّة
45%
Croatian / hrvatski jezik
41%
German / Deutsch
41%
Dutch / Nederlands
41%
Portuguese (BR) / Português (BR)
38%
French / Français
18%
Slovenian / slovenščina
16%
Finnish / Suomi
15%
Croatian / hrvatski jezik
15%
Slovak / Slovenský jazyk
15%
Bulgarian / български език
15%
Portuguese / Português
15%
Japanese / 日本語
13%
Bosnian / bosanski jezik
13%
Spanish (EC) / Español (EC)
13%
Chinese (Traditional) / 繁體中文
13%
Mongolian / монгол
13%
Hebrew / עִבְרִי
13%
Hungarian / Magyar
13%
Spanish (VE) / Español (VE)
13%
Dutch (BE) / Nederlands (BE)
13%
Estonian / Eesti keel
13%
Spanish (CO) / Español (CO)
13%
Turkish / Türkçe
13%
Indonesian / Bahasa Indonesia
13%
Persian / فارس
13%
French (CH) / Français (CH)
13%
Spanish (CL) / Español (CL)
13%
Vietnamese / Tiếng Việt
13%
English (UK)
13%
Thai / ภาษาไทย
13%
Ukrainian / українська
13%
Polish / Język polski
13%
Serbian (Latin) / srpski
13%
Macedonian / македонски јазик
13%
Spanish (MX) / Español (MX)
13%
Spanish (AR) / Español (AR)
13%
Romanian / română
13%
Turkish / Türkçe
13%
Spanish (DO) / Español (DO)
13%
Spanish / Español
12%
French (CA) / Français (CA)
12%
Spanish (PE) / Español (PE)
12%
Spanish / Español
12%
Russian / русский язык
10%
Latvian / latviešu valoda
10%
Spanish (PY) / Español (PY)
10%
Spanish (CR) / Español (CR)
10%
Norwegian Bokmål / Norsk bokmål
10%
Greek / Ελληνικά
9%
Vietnamese / Tiếng Việt
9%
Lithuanian / Lietuvių kalba
8%
Lithuanian / Lietuvių kalba
8%
Galician / Galego
1%
Catalan / Català
1%
Lao / ພາສາລາວ
1%
Galician / Galego
1%
English (AU)
1%
Hindi / हिंदी
1%