mrp_timer
A duration that counts up while the operator is clocked on. It asks the server for the real elapsed time rather than trusting the stored value, then keeps ticking locally.
| Technical name | mrp_timer |
|---|---|
| Field types | float |
| Views | form, list, kanban |
| Also registered as | a formatter of the same name in the formatters registry |
| Module | mrp, the Manufacturing app |
| Used in core | Work order durations across the Manufacturing views |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | No. It depends on a companion working flag and a server method |
| Alternatives | float_time, timesheet_duration_uom, float, mrp_should_consume |
What the manufacturing timer does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
is_user_working | companion field | Read by literal name. When true the timer runs live; otherwise the stored value is simply formatted. |
get_duration | server method | Called for a running timer to obtain the real elapsed duration, so a page reload does not restart the count. |
It registers a formatter too. The same name is added to the formatters registry alongside the widget, so the minute formatting can be reused by other code without instantiating the widget. That is unusual and worth knowing if you are formatting durations elsewhere in Manufacturing.
Working examples
Asking the server rather than counting from page load
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Behavior unchanged on the development branch. |
| Odoo 19.0 | Verified | Verified against the shipped source. |
| Odoo 18.0 | Verified | Same behavior with internal differences. |
| Odoo 17.0 | Verified | Same behavior with older component conventions. |
| Odoo 16.0 | Verified | Same behavior with older component conventions. |
Upgrade note. The widget and its companion flag have been stable across Odoo 16 to 19, so views carry over. The internals have moved between versions, so a customization that patched the ticking is more likely to need attention than a view.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The timer does not tick | The record does not carry the working flag, or it is false for the current user. Load that field in the view and check the operator is actually clocked on. |
| The timer restarts after a reload | It should not; the widget asks the server for the real duration. Check the server method is reachable and returns a duration. |
| The value jumps while running | The record became dirty and the field changed, so the widget adopted the record's value. Expected; something else on the form updated the duration. |
| The format differs from other screens | Those screens may use the registered formatter rather than the widget. Use the formatter of the same name for consistency. |
| It will not attach to my field | The declared supported type is a decimal number. Store the duration as a float. |
| Missing widget error | The manufacturing module is not installed in that database. Install Manufacturing, or use the hours and minutes widget. |
Manufacturing timer vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
mrp_timer | Work order durations that must tick while an operator is working | Takes the running value from the server, then counts locally and cleans up after itself |
| float_time | A completed duration | Formats hours and minutes with no live behavior |
timesheet_duration_uom | Durations that follow a company unit setting | Unit-aware rather than live |
| float | A plain decimal | No time formatting at all |
mrp_should_consume | Quantities on the same screens | Shows a should-consume figure rather than a duration |
Frequently asked questions
How does the timer survive a page reload?+
What decides whether it ticks?+
Does it leak a timer?+
Why is the same name in the formatters registry?+
Does it take options?+
Shop floor data your costing can rely on
Work order timing, scrap and consumption feed straight into product cost, and the shop floor screens decide how honest that data is. We implement Odoo Manufacturing on versions 16 through 19.
Book a free consultation