Skip to main content
iVentureTeam

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.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 27, 2026Updated August 27, 20264 min read
Technical namemrp_should_consume
Field typesfloat
Viewslist, form
Modulemrp, the Manufacturing app
Used in coreComponent lines on manufacturing orders in mrp
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupNo. It is set in view XML and depends on module-specific data
Alternativesfloat, forecast_widget, qty_at_date_widget, mrp_timer

What the should consume field does

A manufacturing order is rarely produced all at once. You set out to make five, you actually finish three today, and the question every component line has to answer is whether the material consumed so far matches what those three should have taken.

The bill of materials knows the ratio, and the server computes the expected figure. This widget puts it beside the consumed quantity, so the line reads as a comparison rather than as a number without context.

It only does that while the comparison means something. On a draft order nothing has been consumed, and on a finished or canceled one the expectation is history, so in those states the widget shows the quantity alone.

What this means for your team

Component variance is where manufacturing margin quietly leaks. A line consistently consuming more than the bill of materials expects is either a recipe that is wrong or a process that is wasteful, and both are invisible if the operator only ever sees one number.

Putting the expectation on the line moves that check to the moment of consumption, where it can still be acted on, rather than into a variance report read weeks later.

The state gating is worth explaining to operators: the second figure disappearing on a completed order is intentional, not a display fault.

Supported options in Odoo 19

The widget declares no options of its own and spreads the decimal field's descriptor, so those options are inherited. What it adds is one companion field and a state check, both listed below. Read from mrp_should_consume.js, Odoo 19.0.

OptionTypeWhat it does
should_consume_qtycompanion fieldRead by literal name and formatted with its own field definition, so it can show different precision from the consumed quantity.
statefield read at setupDecides whether the comparison is shown. Draft, done and canceled suppress it, and the decision is made when the component starts.
digitslistInherited 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 usual usage

<field name="quantity" widget="mrp_should_consume"/>

The consumed quantity, with the expected figure beside it while the order is in progress.

The companion field

<field name="should_consume_qty" column_invisible="True"/>

Read by literal name and formatted with its own precision.

When it shows one number

# order state in draft, done or cancel
# the expected figure is hidden

The comparison only appears while production is under way.

The example the source spells out

The source opens with a worked example that is worth quoting in substance: two components make one finished product, the order is for five, the quantity being produced is three, and the widget shows three against five. That is the entire concept.

Which states show the comparison is decided once when the component starts, from the order's state. Draft, done and canceled all suppress it. Because that decision is made at setup rather than in a getter, a state change while the row is on screen does not toggle the display until the list is redrawn.

The formatting detail matters more than it looks. The expected figure is formatted using the companion field's own definition rather than the consumed field's, with any node options merged in. Two quantities on the same line can therefore render with different precision, which is correct when the fields declare different digits.

The last piece is cosmetic but deliberate: after mounting and after every patch, the widget adds the standard number field classes to the input element, so the paired rendering still looks like an ordinary numeric cell rather than a custom control.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Behavior unchanged on the development branch.
Odoo 19.0VerifiedVerified against the shipped source.
Odoo 18.0VerifiedSame behavior with internal differences.
Odoo 17.0VerifiedSame behavior.
Odoo 16.0VerifiedSame 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

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The development branch is unstable and this may still change; we re-verify this page after the release.

Behavior is unchanged. The comparison, the state gating and the separate formatting of the expected figure all behave the same on the development branch.

Common problems and fixes

SymptomCause and fix
No expected figure appearsThe order is draft, done or canceled, which suppresses the comparison. Expected. The figure only shows while production is under way.
The expected figure is blankThe companion field is not loaded on the line. Add it to the list, column invisible is enough.
The two numbers show different decimalsEach 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 changesThe decision is made when the component starts, not on each render. Reload the list.
The cell looks unlike other numbersThe styling classes added after mounting did not apply. Check for a template override on the input.
Missing widget errorThe manufacturing module is not installed in that database. Install Manufacturing, or use a plain decimal field.

Should consume field vs the alternatives

WidgetBest forKey difference
mrp_should_consumeComponent lines where consumption should be compared against the recipeShows a server-computed expected quantity beside the consumed one, only while production is under way
floatA plain quantityOne number, no comparison
forecast_widgetWhether a demand will be fulfilledA verdict rather than a comparison
qty_at_date_widgetProjected availability on a lineForecast stock rather than recipe expectation
mrp_timerDurations on the same screensTime rather than quantity

Use a plain decimal field where no comparison is wanted, and the forecast widget where the question is whether a demand will be met rather than whether consumption matches a recipe. On a completed order the plain field is all this widget shows anyway.

Frequently asked questions

What is the second number?+
The quantity the bill of materials expects to have been consumed for the quantity currently being produced. The server computes it into a companion field, and the widget formats and displays it.
Why does it sometimes show only one number?+
The comparison is hidden when the order is draft, done or canceled, because the expectation is only meaningful while production is under way.
Why do the two numbers have different decimals?+
Each is formatted with its own field definition. If they should match, align the digits on the two model fields.
Does it take options?+
None of its own. It spreads the decimal field's descriptor, so those options work normally on the consumed quantity.
Which versions have it?+
Odoo 16 onwards with the same behavior, and unchanged on the Odoo 20 development branch.

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

How this page was produced

The worked example, the state gating decided at setup, the companion field read by literal name, its separate formatting and the classes added on mount and patch were read from mrp_should_consume.js on the Odoo 19.0 branch. Version coverage comes from comparing the file across the 16.0, 17.0 and 18.0 branches and against the public development branch. Spotted an error? Tell us and we will correct the page.