TIP: You can type at any time to perform a new search.
Purchase Order Line Merge
purchase_order_line_merge · OCA/purchase-workflow
- Repository
- OCA/purchase-workflow · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Inventory/Purchase
- Folder size
- 0.06 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/purchase-workflow
- Last tracking update
- 2026-09-22 11:15:40
- Authors
- Odoo Community Association (OCA), SpearHead
- Maintainers
- Odoo Community Association (OCA), SpearHead
- Committers
- OCA-git-bot, oca-ci, Ricardo Jara
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- 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.
Code Analysis ⓘ
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.