Skip to main content
iVentureTeam

qty_at_date_widget

The little chart icon on Odoo sale order lines is qty_at_date_widget: a stock-aware view widget that turns red when the line will not be fulfilled on time and opens the availability popover with a jump into the forecast report.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 26, 2026Updated August 26, 20266 min read
Technical nameqty_at_date_widget
Viewsform, list (view widget, element, on sale order lines)
Modulesale_stock (installed when Sales and Inventory coexist)
Used in core2 occurrences in sale_stock: the order line list and the line form dialog
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupNo. It ships preconfigured on sale order lines; Studio cannot add or tune it
Alternativesforecast_widget, stock_rescheduling_popover, sol_product_many2one

What the availability widget does

Every sale order line in a stock-enabled Odoo carries a small chart icon next to the quantity. That icon is qty_at_date_widget, and it answers the seller's real question at quotation time: will we actually be able to deliver this line on the promised date?

The widget itself stores nothing and takes no options. The server computes the raw ingredients, forecasted quantity at the delivery date, free stock today, the quantity still to deliver, an expected date for incoming stock, and the widget combines them client side into one binary verdict: normal icon or red icon. Clicking it opens a popover with the numbers behind the verdict and a button into the full forecast report.

What this means for your team

This is the widget that moves stock checking from a warehouse afterthought to the moment of sale. A salesperson typing a quotation sees red on a line the instant the promise becomes risky, before confirming anything, and the popover's Forecasted Stock and Available rows give the exact shortfall without leaving the order. The View Forecast jump lands in the replenishment picture already filtered to the affected moves, so the fix, a purchase, a transfer, a date change, starts one click from the symptom.

The verdict logic is deliberately stage-aware. On draft quotations it forgives make-to-order products, their stock is expected to be procured, while on confirmed orders it also flags lines whose incoming stock arrives later than the promised date. That distinction is exactly the difference between do not promise this and this promise is now late, and the widget encodes it for free.

Working examples

How core places it

<field name="qty_delivered"/>
<widget name="qty_at_date_widget" width="20px"/>

From the order line list in sale_stock/views/sale_order_views.xml; the line form dialog places the same element after the unit of measure.

The verdict, as computed in the source

// quotations (draft, sent)
will_be_fulfilled = virtual_available_at_date >= qty_to_deliver
forecasted_issue  = !will_be_fulfilled && !is_mto

// confirmed orders (state == 'sale')
will_be_fulfilled = free_qty_today >= qty_to_deliver
will_be_late      = forecast_expected_date > scheduled_date
forecasted_issue  = !will_be_fulfilled || will_be_late

The 19 dual-unit rows, and one dead read

The 19 release added the piece users had asked for since sale lines learned flexible units: dual-unit display. When the popover opens, the widget now reads the line's UoM and the product's base unit over RPC, converts virtual_available_at_date and free_qty_today through the two factors, and prints the converted figures in a muted second line whenever the units differ. So a line sold in boxes shows the forecast in boxes and, underneath, in the units the warehouse counts. One source quirk: the 19 code fetches the unit's rounding field alongside factor and then never uses it, rounding is hardcoded to one decimal via roundPrecision, and the development branch quietly drops the dead read.

The popover template is stage-aware beyond the icon: quotations for MTO products replace the stock rows with a plain Expected Delivery line, confirmed orders show availability against today's free stock, and the whole popover positions above the icon. The forecast jump passes move_to_match_ids and the line id so the report can highlight exactly the moves belonging to this line, and on 16 it pointed at the old replenishment action, renamed to the forecast action in 17, with 18 fixing the warehouse context key from warehouse to warehouse_id.

Version compatibility

VersionStatusNotes
Odoo 20.0VerifiedNot released. sale_stock version continues; a lighter sibling appears in sale. See below.
Odoo 19.0VerifiedVerified against the shipped source. Adds dual-unit popover rows and the product-expiry label patch.
Odoo 18.0VerifiedSame verdict; fixed the forecast context key to warehouse_id.
Odoo 17.0VerifiedSame widget; the popover's forecast button targets the renamed forecast action.
Odoo 16.0VerifiedSame concept, pointing at the old replenishment action, with a legacy twin file still shipped.

Upgrade note. Nothing view-side changes across 16 to 19. JavaScript patches need review at each step: the 17 action rename, the 18 warehouse_id context key, and 19's switch to relational .id access plus the new UoM fetch path all touch popular patch points.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. We read both files on the public development branch at the time of writing; the branch is unstable and this page will be re-verified after release.

The development branch splits the concept in two. A new simple_qty_at_date_widget lands in the sale module itself: four dependencies, no stock module needed, icon turns red when forecast at date is below the line's undelivered quantity. The sale_stock widget keeps the full verdict and popover, gains a source TODO to inherit from the simple one, migrates calcData onto computed() reactive state, and drops the unused rounding read. Patches on calcData timing are the ones that will break.

Common problems and fixes

SymptomCause and fix
No icon on some order linesdisplay_qty_widget computed false, typically for services, non-storable products or delivered lines. Expected behavior; the widget hides itself whenever the server says there is nothing to forecast.
Icon is red but the popover numbers look sufficientOn confirmed orders lateness alone triggers red: incoming stock arrives after the promised date. Check forecast_expected_date against the line's scheduled date; reschedule or expedite the supply.
A quotation line with no stock is not redMake-to-order lines are exempt on quotations by design; their supply is created at confirmation. No action needed; the line is re-judged once the order is confirmed.
Widget shows nothing on a custom line viewThe element was copied to a model that is not sale.order.line, so the ten dependencies cannot resolve. Keep it on sale order lines; other models need their own widget and computes.
Converted unit rows are missing in the popoverThe second line only renders when the line's unit differs from the product's base unit. Expected; identical units mean nothing to convert.
Forecast button opens an unfiltered reportThe context carries the line's product and move ids; stale moves or a missing warehouse loosen the filter. Verify the line has generated its moves and the warehouse is set on the order.

Availability widget vs the alternatives

WidgetBest forKey difference
qty_at_date_widgetPer-line delivery risk on sale orders, at a glanceClient-side verdict over ten server-computed fields, with a scoped forecast jump
forecast_widgetThe same risk verdict on stock move linesA field widget on moves comparing forecast against the move date, badge styled
stock_rescheduling_popoverReschedule warnings on deliveries after confirmationDriven by a JSON field listing the documents that force a date change
sol_product_many2oneThe product picker on the same order linesA relational field widget; complements rather than replaces the availability icon

This widget judges one line's promise. For the whole product's picture the forecast report remains the tool, and for reschedule warnings after confirmation the rescheduling popover takes over on the delivery side.

Frequently asked questions

When does the qty_at_date_widget icon turn red?+
On quotations: when the forecasted quantity at the delivery date cannot cover the line and the product is not make-to-order. On confirmed orders: when today's free stock cannot cover it, or the expected replenishment date is later than the scheduled delivery.
Why is there no icon on my service or consumable lines?+
The server-computed display_qty_widget gates rendering, and it is false where forecasting makes no sense. The widget renders an invisible placeholder rather than nothing, which keeps list columns aligned.
What do Forecasted Stock and Available mean in the popover?+
Forecasted Stock is virtual_available_at_date, the projection at the delivery date including planned moves. Available is free_qty_today, unreserved stock right now. Quotations judge against the first, confirmed orders against the second.
Why do some popovers show a second, smaller quantity line?+
That is the Odoo 19 dual-unit display: when the sale line's unit differs from the product's base unit, the widget fetches both conversion factors and prints the converted figures underneath, rounded to one decimal.
What does the product expiry module change here?+
For products tracked with expiration dates, sale_stock_product_expiry patches the popover labels to Fresh Forecasted Stock and Fresh Available, signaling that the figures count only unexpired stock.
Does the widget work without the Inventory app?+
Not in 19; it ships in sale_stock, the bridge module. The development branch adds simple_qty_at_date_widget in sale itself for stockless databases, judging against the undelivered quantity.

Are your sales promises backed by your stock reality?

Availability logic like this widget only pays off when lead times, MTO routes and safety stock are configured to match how you actually supply. We tune Odoo sales and inventory flows end to end so the red icon means what your team thinks it means.

Get your sale-to-stock flow reviewed

How this page was produced

Behavior, dependencies and the verdict logic were read from qty_at_date_widget.js and its QWeb template on the Odoo 19.0 branch, compared against 16.0, 17.0, 18.0, the sale_stock_product_expiry sibling and the development branch, and both placements were verified in sale_order_views.xml. Spotted an error? Tell us and we will correct the page.