Extend period and comparison period options for the date and datetime fields filted menu adding a new option called "Custom Period".
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Adds a "Custom period" option to the date filter and comparison menus in Odoo's search bar, letting users filter records by a chosen number of days, weeks, months or years.
This module extends the date filter menu that appears in the search bar of list, kanban and other views. When you open a date field's filter options, you now see an extra "Custom period" entry. Clicking it opens a small form where you enter a quantity and choose a unit: Day, Week, Month or Year. Pressing Add creates a filter such as "Last 3 weeks" and applies it to the records on screen.
The same "Custom period" option is also added to the comparison menu. There you can additionally pick which date field to compare, and the module builds a comparison like "Previous 2 months" for that field.
Behind the scenes the module adjusts how Odoo calculates date ranges so that day and week periods are supported, and it keeps the year part of the filter consistent when a custom period is used. It only changes the search bar behaviour; no new menus, database models or reports are created. The feature is available wherever a date or datetime field can be filtered, for example on sales orders, invoices or any list with a date column.
Depends on
Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 5 confirmed, 4 with no information of 9 versions.
Sources · Odoo 16.0
Confirmed on 2026-11-03 in branch 16.0 of OCA/web.
terminal Installation and usage
OCA documentation · Odoo 18.0Usage
Source · Odoo 18.0To 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.
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.
No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.