Custom Time Formatter Widget

Adds a customizable widget that formats time durations into a user-friendly HH:mm:ss display format across relevant fields in Odoo
May 9, 2025 by
Custom Time Formatter Widget
Silverdale Technology, Somroo Hassaan
| No comments yet

Odoo natively stores time durations in decimal formats (e.g., 1.75 hours), which can be less intuitive for users reading or interpreting times, especially in operational or production settings. The Custom Time Formatter Widget provides a clean solution by rendering such durations in a HH:mm:ss format wherever the widget is applied.

This feature enhances readability and reduces confusion, especially for time-based reports, logs, or forms used by operations, HR, or manufacturing teams.

Once enabled, any field using this widget will automatically convert and present the time in a standard hours:minutes:seconds format, while still retaining the underlying precision and compatibility with Odoo's backend.

Key Benefits

  1. Improved Readability
    Durations are shown in an easily understood format.
  2. Reduced Errors
    Prevents misinterpretation of decimal-based times.
  3. Consistent UX
    Applies a uniform format across different views and models.
  4. Plug-and-Play
    Can be attached to any duration field using widget configuration.

Example Use Case

In the manufacturing module, a work center operation duration of "1.50 hours" is shown as "01:30:00", helping operators and managers better track time spent on production steps.

Conclusion

The Custom Time Formatter Widget enhances user experience and operational clarity by displaying durations in a familiar HH:mm:ss format. This intuitive time presentation helps users work more effectively and minimizes interpretation errors across modules in Odoo.

Share this post
Sign in to leave a comment