| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 960 |
| Technical Name |
time_range |
| License | LGPL-3 |
| Website | https://apps.odoo.com/apps/modules/browse?search=Abdallah+salem |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 960 |
| Technical Name |
time_range |
| License | LGPL-3 |
| Website | https://apps.odoo.com/apps/modules/browse?search=Abdallah+salem |
Time Range
Manage And Filter By Time-Of-Day Ranges
Inspired by the OCA Date Range module — reimagined for time-of-day filtering
Key Highlights
Time Range Types
Organize ranges into categories like Work Shifts, Business Hours, or custom types.
Overlap Protection
Prevent conflicting time ranges within a type. Configure overlap rules per type.
Batch Generator
Auto-generate hourly or custom time blocks via an intuitive wizard interface.
Overnight Support
Supports time ranges crossing midnight such as 22:00 to 06:00 for night shifts.
Manage configurable time-of-day ranges and integrate time filtering
into any Odoo model with a simple mixin inheritance.
Configure Time Ranges
Navigate to Settings > Technical > Time Ranges to access the time range management. Create Time Ranges, Time Range Types, or use the batch generator to quickly set up your time periods.
Manage Your Time Ranges
View and manage all your time ranges in a clean list view. Each range shows its name, type, start time, end time, overnight indicator, and company. Toggle ranges on/off with a single click.
Named time ranges with start/end times (HH:MM) using Odoo's float_time widget.
Type-based organization: group ranges into Work Shifts, Business Hours, or custom categories.
Overnight range support (e.g., 22:00 to 06:00) with automatic midnight-crossing detection.
Overlap detection and prevention per type to ensure ranges don't conflict.
Batch generation wizard for quick setup of hourly or custom time blocks.
Multi-company support with record rules for secure, isolated time range management.
Abstract mixin for easy integration: inherit time.range.search.mixin to add time filtering to any model.
Compatible with both Odoo Community and Enterprise editions.
FAQ
This module is inspired by the OCA Date Range module, which provides date-based range filtering. Our Time Range module applies the same concept but for time-of-day filtering, allowing you to filter records based on the time component of datetime fields regardless of the date.
Inherit the time.range.search.mixin on your model and set the _time_range_search_field attribute to the datetime field you want to filter. For example: _inherit = ['sale.order', 'time.range.search.mixin'] and _time_range_search_field = 'create_date'. The "Time Period" filter will automatically appear in your model's search view.
Yes! When the end time is earlier than the start time (e.g., 22:00 to 06:00), the module automatically detects it as an overnight range and uses OR logic in SQL to correctly match records from both before and after midnight.
Yes! The module includes a batch generation wizard accessible from Settings > Technical > Time Ranges > Generate Time Ranges. Configure the duration, start time, count, and naming prefix to auto-generate multiple time ranges at once.
Yes! This module is fully compatible with both Odoo Community and Odoo Enterprise editions. It only depends on the core "web" module which is available in both versions.
Release 18.0.1.0.0
March, 2026- Initial release
- Time Range and Time Range Type models
- Abstract search mixin for any model integration
- Batch generation wizard
- Overnight range support with automatic detection
- Overlap protection per type
- Multi-company support with record rules
- Domain selector and tree editor JavaScript integration
Please log in to comment on this module