Skip to content
Health
67/100
fair
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 1 month ago
  • Required by5/25
    0 modules depend on it
  • Maturity12/25
    In 2 Odoo series since 8.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
1.51 MB
Module directory on disk
Code analysis 0 migration notes 3 models 3 views 0 HTTP endpoints

Description

This module lets salespeople merge sale orders of the same customer into a single order. The lines of the merged orders move to the target order, and the other orders are cancelled.

Quotations, sent or not, can always be merged, and confirmed orders too when the corresponding setting is enabled. When the target order is confirmed, the pending deliveries of the merged orders are merged with its own, and their draft invoices are merged into one.

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 3

XML IDNameModelTypeStatus
res_config_settings_view_form res.config.settings.view.form.inherit.sale_order_merge res.config.settings form Inherits sale.res_config_settings_view_form
sale_order_merge_form sale.order.merge.view.form sale.order.merge form New
view_order_form sale.order.view.form.inherit.sale.order.merge sale.order form Inherits sale.view_order_form

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 3

New fields (1)
  • merge_order_confirm Boolean
    config_parameter='sale_order_merge.merge_order_confirm' default=False string='Merge confirmed orders'
Public methods (0)

No public methods.

New fields (2)
  • merge_ok Boolean
    compute='_compute_merge_ok' args: 'Has candidates to merge with'
  • merge_with_ids Many2many → sale.order
    comodel_name='sale.order' compute='_compute_merge_with_ids' search='_search_merge_with_ids' string='Can be merged with'
Public methods (1)
  • action_button_merge(self)

New fields (4)
  • mergeable_ids Many2many → sale.order
    comodel_name='sale.order' related='order_id.merge_with_ids'
  • message_alert Boolean
    compute='_compute_message_alert' store=True
  • order_id Many2one → sale.order
    domain="[('id','in',to_merge_ids)]" required=True args: 'sale.order', 'Merge into'
  • to_merge_ids Many2many → sale.order
    domain="[('id','in',mergeable_ids)]" args: 'sale.order', 'rel_sale_to_merge', 'sale_id', 'to_merge_id', 'Orders to merge'
Public methods (4)
  • merge(self)
  • merge_moves(self)
    Merge all draft invoices into one, preferably a draft invoice of the target order. Invoices that are not in draft are kept as they are. The invoices follow the order lines, so they end up on the target order once the lines are merged.
  • merge_order_lines(self)
  • merge_pickings(self)
    Assign all pickings to the target sale order and merge any pending pickings. In each group of pickings merged together, the one of the target order is kept, or the oldest one when it has none.

Loading…