During Hour Operator
by Abdallah Salem https://apps.odoo.com/apps/modules/browse?search=Abdallah+salem| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 192 |
| Technical Name |
day_hour_operator |
| License | LGPL-3 |
| Website | https://apps.odoo.com/apps/modules/browse?search=Abdallah+salem |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 192 |
| Technical Name |
day_hour_operator |
| License | LGPL-3 |
| Website | https://apps.odoo.com/apps/modules/browse?search=Abdallah+salem |
During Hour Operator
Filter Any Datetime Field By Time Of Day
Key Highlights
Time-of-Day Filtering
Filter records by hour ranges regardless of the date. Find all orders created between 9 AM and 5 PM.
Timezone Aware
Automatically converts UTC-stored datetimes to your local timezone for accurate time-of-day filtering.
Overnight Ranges
Supports time ranges that cross midnight, such as 22:00 to 06:00, for night shift analysis.
Works Everywhere
Available on any datetime field in filters, domain selector, and developer tools across all models.
Add powerful time-of-day filtering to any Odoo datetime field.
Perfect for analyzing business hours, shift patterns, and time-based workflows.
Step 1: Open Filters Menu
Navigate to any list view and click "Filters" then "Add Custom Filter" to access the advanced filtering options. The during hour operator works on any model with datetime fields.
Step 2: Select "During Hour" Operator
Choose a datetime field (e.g. Creation Date), then select the "during hour" operator from the dropdown. This new operator appears automatically on all datetime fields after installing the module.
Step 3: Set Your Time Range
Use the intuitive time pickers to define your start and end times. The default range is 09:00 AM to 05:00 PM. You can also set overnight ranges like 22:00 to 06:00 for night shift analysis.
Step 4: View Filtered Results
The filter is applied instantly. An active filter badge shows a human-readable description like "Creation Date is between 10:00 and 18:00" for quick reference. Only records created during the specified hours are displayed.
Custom "during hour" operator available on every datetime field in Odoo.
Timezone-aware: automatically converts stored UTC times to your local timezone.
Supports overnight ranges that cross midnight (e.g., 22:00 to 06:00) for night shift analysis.
Intuitive time range picker with HTML5 time inputs for easy start and end time selection.
Default range of 09:00 to 17:00 (standard business hours) for quick filtering.
Human-readable filter descriptions (e.g., "is between 09:00 and 17:00") in the search bar.
Works in both the domain selector and visual tree editor (filters & developer tools).
Compatible with both Odoo Community and Enterprise editions.
FAQ
The "during hour" operator works with any datetime field on any model in Odoo. This includes Creation Date, Write Date, Order Date, Scheduled Date, and any custom datetime fields you may have added.
Yes! When the start time is greater than the end time (e.g., 22:00 to 06:00), the module automatically uses OR logic to correctly capture records from both before midnight and after midnight. This is perfect for night shift analysis or overnight operations.
Odoo stores all datetime values in UTC. This module automatically converts stored UTC times to your configured user timezone before applying the time-of-day filter. It respects the timezone set in your user preferences, so filtering for "9 AM to 5 PM" gives you results in your local time.
No. This module only depends on the "web" module that comes standard with every Odoo installation. No extra Python packages, system libraries, or external services are required. It works with both frontend JavaScript and a lightweight backend patch.
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. The operator integrates seamlessly with Odoo's standard filter system.
Release 18.0.1.0.0
March, 2026- Initial release
- Custom "during_hour" domain operator for datetime fields
- Time-of-day range picker UI component
- Timezone-aware SQL filtering with user timezone conversion
- Overnight range support (e.g., 22:00 to 06:00)
- Human-readable filter descriptions in search bar
Please log in to comment on this module