Repository
OCA/sale-workflow · module folder · Try on Runboat
Module version
1.1.0
Category
Sales Management
Folder size
0.04 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/sale-workflow
Last tracking update
2026-07-28 12:13:56
Authors
Odoo Community Association (OCA), Camptocamp
Maintainers
Odoo Community Association (OCA), Camptocamp
Committers
OCA-git-bot, oca-ci, David Gallay
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description
This module automatically assigns a sales workflow at sale order creation.

The workflow to assign is selected from the `sale.workflow.process` records flagged
as *Auto assign*, using their *Auto assign domain* (evaluated against the sale order)
and ordered by priority.

It also extends the *Copy workflow on duplication* setting of
`sale_automatic_workflow` with a third option, *Copy if auto-assign finds none*:
auto-assignment runs first when a sale order is duplicated, and the origin workflow is
copied only when no workflow could be auto-assigned.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
sale_workflow_process_view_form sale.order.form.automatic.auto.assign sale.workflow.process form Inherits sale_automatic_workflow.sale_workflow_process_view_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (3)

New fields (1)
  • sale_workflow_copy_mode Selection
    help="Controls whether the automatic workflow is propagated when a sale order is duplicated (this includes order splits):\n- Don't copy: the workflow is re-derived from the auto-assign rules only.\n- Copy: the origin workflow is always copied, auto-assign is not re-run.\n- Copy if auto-assign finds none: auto-assign runs first; the origin workflow is copied only when no workflow could be auto-assigned." ondelete={'copy_fallback': 'set default'} selection_add=[('copy_fallback', 'Copy if auto-assign finds none')]
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • copy(self, default=None)
  • create(self, vals_list)
    @api.model_create_multi

New fields (3)
  • auto_assign Boolean
    help='When enabled the workflow will be assigned at sales order creation, if the assignation domain below applies.' string='Auto assign'
  • auto_assign_domain Text
    string='Auto assign domain'
  • auto_assign_priority Integer
    default=10 help='Determines the priority of the workflow when auto-assigning. Lower numbers have higher priority.'
Public methods (0)

No public methods.