Purchase Order Line Merge
purchase_order_line_merge · OCA/purchase-workflow
Health
60/100
fair
-
Security25/25No findings
-
Activity25/25Last human commit 3 months ago
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 18.0
Heuristic over the facts below, not an audit · How it's computed
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.06 MB
Module directory on disk
Code analysis
0 migration notes
2 models
1 view
0 HTTP endpoints
Description
This module allows users to select multiple purchase order lines from different purchase orders and merge them into a single new purchase order.
Unlike purchase_merge which works at the order level, this module
operates at the line level, giving more granular control over which
specific lines to consolidate.
Key features:
- Lines with the same product, unit price, unit of measure, and taxes are automatically grouped into a single line on the resulting purchase order.
- The default quantity to merge considers both invoiced and received amounts, defaulting to the available (uninvoiced/unreceived) quantity.
- The unit price is editable in the wizard, allowing price adjustments before creating the new order.
- Partial merges are supported: the remaining quantity stays on the original order.
- Orders that reach zero amount after the merge are automatically cancelled.
This module also adds the Qty Invoiced and Qty Received columns to the Purchase Order Lines list view for better visibility.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 1
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
purchase_order_line_merge_form |
purchase.order.line.merge.form | purchase.order.line.merge | form | New |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 2
New fields (3)
-
date_orderDatetimedefault=fields.Datetime.nowrequired=Truestring='Order Date' -
line_idsOne2many → purchase.order.line.merge.linecomodel_name='purchase.order.line.merge.line'inverse_name='wizard_id'string='Lines' -
partner_idMany2one → res.partnercomodel_name='res.partner'required=Truestring='Vendor'
-
action_merge(self) -
default_get(self, fields_list)@api.model
New fields (11)
-
discountFloatrelated='source_line_id.discount' -
order_idMany2onerelated='source_line_id.order_id' -
original_qtyFloatdigits='Product Unit of Measure'readonly=True -
price_subtotalFloatcompute='_compute_price_subtotal'string='Subtotal' -
price_unitFloatdigits='Product Price'string='Unit Price' -
product_idMany2onerelated='source_line_id.product_id' -
product_uomMany2onerelated='source_line_id.product_uom' -
quantityFloatdigits='Product Unit of Measure'string='Quantity to Merge' -
source_line_idMany2one → purchase.order.linecomodel_name='purchase.order.line'readonly=Truerequired=Truestring='Source Line' -
taxes_idMany2manyrelated='source_line_id.taxes_id' -
wizard_idMany2one → purchase.order.line.mergecomodel_name='purchase.order.line.merge'ondelete='cascade'required=True
No public methods.