Merge sale orders
sale_order_merge · OCA/sale-workflow
Health
67/100
fair
-
Security25/25No findings
-
Activity25/25Last human commit 1 month ago
-
Required by5/250 modules depend on it
-
Maturity12/25In 2 Odoo series since 8.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
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
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 3
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
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_confirmBooleanconfig_parameter='sale_order_merge.merge_order_confirm'default=Falsestring='Merge confirmed orders'
No public methods.
New fields (2)
-
merge_okBooleancompute='_compute_merge_ok' args: 'Has candidates to merge with' -
merge_with_idsMany2many → sale.ordercomodel_name='sale.order'compute='_compute_merge_with_ids'search='_search_merge_with_ids'string='Can be merged with'
-
action_button_merge(self)
New fields (4)
-
mergeable_idsMany2many → sale.ordercomodel_name='sale.order'related='order_id.merge_with_ids' -
message_alertBooleancompute='_compute_message_alert'store=True -
order_idMany2one → sale.orderdomain="[('id','in',to_merge_ids)]"required=True args: 'sale.order', 'Merge into' -
to_merge_idsMany2many → sale.orderdomain="[('id','in',mergeable_ids)]" args: 'sale.order', 'rel_sale_to_merge', 'sale_id', 'to_merge_id', 'Orders to merge'
-
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…