OdooWiki OCA HUB

Sale Stock Reference by Line

sale_stock_reference_by_line folder_open OCA/sale-workflow open_in_new
Warehouse License: AGPL-3

This module was written to extend the functionality of stock references (previously: procurement groups) created from a sale order

On itself, this module does nothing. It is a requirement for modules that need to create a stock reference for each individual sale order line.

This module was previously known as "Sale Procurement Group by Line" (sale_procurement_group_by_line)

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Adds a stock reference field on each sale order line so that stock moves generated from a sale order can be grouped per line instead of per order. On its own it changes little; it is a base for other modules.

This module prepares Odoo so that stock operations coming from a sale order can be grouped line by line rather than all together for the whole order.

What it adds: - A new field, "Procurement Reference", on each sale order line, linking the line to a stock reference. - When stock is launched from a confirmed sale order, the module looks for an existing reference on the line or on other lines of the same order, and creates a new stock reference if none is found. The line is then linked to that reference. - The reference is passed along when the system prepares the stock operations for the line. - When stock moves are being matched or merged, moves are only merged with other moves that belong to the same stock reference of the sale line.

Where it appears: the new field is visible on sale order lines (for example in the order lines list). There are no new menus or screens.

Business rules and automatic behaviour: - Stock is only launched for lines that are confirmed, whose order is not locked, and whose product is a consumable-type product. - Lines whose delivered/launched quantity already equals the ordered quantity are skipped. - The reference is not copied when a sale order line is duplicated.

It touches sale.order.line and stock.move. The module does nothing visible by itself; it is meant to be used together with other modules that define how these references are created.

Depends on

sale_stock
Models and fields (1)
  • sale.order.line · extends an existing modelstock_reference_id

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 19.0

Confirmed on 2026-11-03 in branch 19.0 of OCA/sale-workflow.

terminal Installation and usage

No verified information

Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.