Skip to content
Health
60/100
fair
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 3 months ago
  • Required by5/25
    0 modules depend on it
  • Maturity5/25
    In 1 Odoo series since 18.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
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

Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 1

XML IDNameModelTypeStatus
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_order Datetime
    default=fields.Datetime.now required=True string='Order Date'
  • line_ids One2many → purchase.order.line.merge.line
    comodel_name='purchase.order.line.merge.line' inverse_name='wizard_id' string='Lines'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' required=True string='Vendor'
Public methods (2)
  • action_merge(self)
  • default_get(self, fields_list)
    @api.model

New fields (11)
  • discount Float
    related='source_line_id.discount'
  • order_id Many2one
    related='source_line_id.order_id'
  • original_qty Float
    digits='Product Unit of Measure' readonly=True
  • price_subtotal Float
    compute='_compute_price_subtotal' string='Subtotal'
  • price_unit Float
    digits='Product Price' string='Unit Price'
  • product_id Many2one
    related='source_line_id.product_id'
  • product_uom Many2one
    related='source_line_id.product_uom'
  • quantity Float
    digits='Product Unit of Measure' string='Quantity to Merge'
  • source_line_id Many2one → purchase.order.line
    comodel_name='purchase.order.line' readonly=True required=True string='Source Line'
  • taxes_id Many2many
    related='source_line_id.taxes_id'
  • wizard_id Many2one → purchase.order.line.merge
    comodel_name='purchase.order.line.merge' ondelete='cascade' required=True
Public methods (0)

No public methods.