mrp_should_consume
The component quantity with a second number beside it: what the bill of materials says you should have consumed for the quantity you are actually producing.
| Technical name | mrp_should_consume |
|---|---|
| Field types | float |
| Views | list, form |
| Module | mrp, the Manufacturing app |
| Used in core | Component lines on manufacturing orders in mrp |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | No. It is set in view XML and depends on module-specific data |
| Alternatives | float, forecast_widget, qty_at_date_widget, mrp_timer |
What the should consume field does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
should_consume_qty | companion field | Read by literal name and formatted with its own field definition, so it can show different precision from the consumed quantity. |
state | field read at setup | Decides whether the comparison is shown. Draft, done and canceled suppress it, and the decision is made when the component starts. |
digits | list | Inherited from the decimal field, applying to the consumed quantity. |
The expected figure is formatted with its own field's settings. The widget reads the companion field's definition for precision rather than reusing the consumed field's, and merges in any node options, so the two numbers can legitimately show different decimal places.
Working examples
The example the source spells out
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. |
| Odoo 16.0 | Verified | Same behavior with older component conventions. |
Upgrade note. The widget has been present since Odoo 16 with the same behavior and needs no view change. Internals differ between versions, so a customization of the rendering is more likely to need attention than a view.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| No expected figure appears | The order is draft, done or canceled, which suppresses the comparison. Expected. The figure only shows while production is under way. |
| The expected figure is blank | The companion field is not loaded on the line. Add it to the list, column invisible is enough. |
| The two numbers show different decimals | Each is formatted with its own field definition. Align the digits on the two model fields if they should match. |
| The comparison does not appear when the state changes | The decision is made when the component starts, not on each render. Reload the list. |
| The cell looks unlike other numbers | The styling classes added after mounting did not apply. Check for a template override on the input. |
| Missing widget error | The manufacturing module is not installed in that database. Install Manufacturing, or use a plain decimal field. |
Should consume field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
mrp_should_consume | Component lines where consumption should be compared against the recipe | Shows a server-computed expected quantity beside the consumed one, only while production is under way |
| float | A plain quantity | One number, no comparison |
| forecast_widget | Whether a demand will be fulfilled | A verdict rather than a comparison |
qty_at_date_widget | Projected availability on a line | Forecast stock rather than recipe expectation |
mrp_timer | Durations on the same screens | Time rather than quantity |
Frequently asked questions
What is the second number?+
Why does it sometimes show only one number?+
Why do the two numbers have different decimals?+
Does it take options?+
Which versions have it?+
Manufacturing variance caught at the line, not in a report
Bills of materials, consumption tracking and the costing that follows only work if the shop floor sees the expectation as it works. We implement Odoo Manufacturing on versions 16 through 19.
Book a free consultation