Purchase/Sale: link by origin
By default since Odoo 14.0, PO and SO are linked by their order lines.
This module also link them by the PO's Origin field, to cover more cases. For example:
- If a user cancels a PO, by default the link would have been broken; now it won't;
- Or if a user manually defines or updates the Origin field of a PO, it will be taken into account.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0This module links purchase orders and sales orders by the purchase order's Origin field, in addition to the standard line-based link. Users see related sales orders on a purchase order and related purchase orders on a sales order even when the link would otherwise be lost.
Odoo normally links purchase orders (POs) and sales orders (SOs) through their order lines. This module adds a second link based on the Origin field of the purchase order.
On a purchase order, the module looks at the Origin field, splits it by commas, and searches for sales orders whose reference matches any of those values. Those sales orders are then included in the related sales orders shown on the purchase order.
On a sales order, the module searches for purchase orders whose Origin field equals the sales order reference, and includes them in the related purchase orders shown on the sales order.
The link is recalculated automatically when the Origin field changes, so manually setting or updating the Origin on a purchase order is taken into account. This also means the link survives cases where the line-based link would be broken, for example when a purchase order is cancelled.
The module extends the purchase.order and sale.order models. It does not add new menus, fields, or reports; it only changes how the existing related orders counts and lists are computed.
Depends on
Models and fields (2)
- sale.order · extends an existing model
- purchase.order · extends an existing model
Text generated by AI (DeepSeek) from reading the Odoo 18.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-03Confirmation status: 3 confirmed, 6 with no information of 9 versions.
Sources · Odoo 17.0
Confirmed on 2026-11-03 in branch 17.0 of OCA/purchase-workflow.
terminal Installation and usage
No verified informationInstallation 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.
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.