Merge sale orders

sale_order_merge
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/8.0/sale_order_merge
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYSales Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Opener B.V.
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Opener B.V.
COMMITTERS
COMMITTERSJordi Ballester Alomar, OCA Transbot, oca-travis, Weblate, OCA-git-bot
WEBSITE
WEBSITEhttps://github.com/oca/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:21
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_stock
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web_kanban
    - web
    - web_kanban_sparkline
    - account_voucher
    - account
    - product
    - decimal_precision
    - report
    - analytic
    - board
    - edi
    - email_template
    - procurement
    - stock_account
    - stock
    - web_kanban_gauge
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
sale_order_form Add merge button to sale order form sale.order field Inherits sale.view_order_form
view_sale_order_merge_form sale.order.merge form New
Models touched (2)

New fields (2)
  • merge_ok Boolean
    compute='_compute_merge_ok' args: 'Has candidates to merge with'
  • merge_with Many2many → sale.order
    comodel_name='sale.order' compute='_compute_merge_with' search='_search_merge_with' string='Can be merged with'
Public methods (1)
  • button_merge(self)
    @api.multi

New fields (3)
  • mergeable Many2many → sale.order
    comodel_name='sale.order' related='sale_order.merge_with'
  • sale_order Many2one → sale.order
    readonly=True required=True args: 'sale.order', 'Merge into'
  • to_merge Many2many → sale.order
    args: 'sale.order', 'rel_sale_to_merge', 'sale_id', 'to_merge_id', 'Orders to merge'
Public methods (5)
  • merge(self)
    @api.multi
    If not all orders have the same policy: If not all confirmed orders have the same policy: raise Set the policy to the policy of the confirmed order(s) If there is one confirmed order, confirm all other orders. For prepaid orders, this will generate draft invoices.
  • merge_invoices(self)
    @api.multi
    Merge all draft invoices. For prepaid orders, the payment of the original invoice is leading to start the procurement, but there may still be other confirmed invoices.
  • merge_order_lines(self)
    @api.multi
  • merge_pickings(self)
    @api.multi
    Assign all pickings to the target sale order and merge any pending pickings
  • open_sale(self)
    @api.multi
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/sale-workflow
PULL REQUEST
PULL REQUEST[17.0][MIG] sale_order_merge (#3904)