diff options
| author | Mathieu Duckerts-Antoine <dam@odoo.com> | 2018-06-12 17:11:13 +0200 |
|---|---|---|
| committer | Adrien Dieudonne <adr@odoo.com> | 2018-07-06 14:09:09 +0200 |
| commit | 097464de6f85020ad1e56bbc253837a7d60e47e4 (patch) | |
| tree | a33c5fbe25cedfd2b0ac378b13ac2d47f38f393b /addons/web/static/src/js/widgets/debug_manager.js | |
| parent | 9756109e670cef01b4d475c8cb6687fecdab2cd2 (diff) | |
[IMP] web: easy selection of a period in filters menu
This commit allow to create easily a range of periods (related to a field
of date or datetime type) to select in the filters menu.
Two new attributes on elements with tag 'filter' are now usable
in combination in a search view arch:
- date: string.
A valid field name with associated type date or datetime
- default_period: string (optional).
To choose in the following list:
- 'today'
- 'this_week'
- 'this_month' (default)
- 'this_quarter'
- 'this_year'
- 'yesterday'
- 'last_week'
- 'last_month'
- 'last_quarter'
- 'last_year'
- 'last_7_days'
- 'last_30_days'
- 'last_365_days'
Example:
<filter string="Creation Date" name="period_generator" date="create_date" default_period="this_quarter"/>
Note: the attribute 'domain' can not be used for such filters.
The generated domains are dynamic and can be saved as such
via the favorites menu.
Diffstat (limited to 'addons/web/static/src/js/widgets/debug_manager.js')
0 files changed, 0 insertions, 0 deletions
