Approval Workflow Engine - BPM Process Designer
by Sappinov https://github.com/workflow-base/workflow_base$ 118.62
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 3013 |
| Technical Name |
workflow_base |
| License | LGPL-3 |
| Website | https://github.com/workflow-base/workflow_base |
| Versions | 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 3013 |
| Technical Name |
workflow_base |
| License | LGPL-3 |
| Website | https://github.com/workflow-base/workflow_base |
| Versions | 18.0 19.0 |
Approval Workflow Engine
Odoo 18 Approval BPM State Machine Visual Designer
Visual Workflow Builder for Odoo
Create and manage complex approval workflows with an intuitive drag-and-drop interface. Design stages, transitions, and approval rules visually - no coding required for workflow configuration.
Visual Workflow Designer
Design your workflows visually with our intuitive drag-and-drop interface powered by JointJS. Create stages, connect them with routes, and see your complete workflow at a glance.
Key Features
Visual Workflow DesignerDrag and drop interface to create workflow stages and define transitions. See your workflow as a visual flowchart with color-coded stages and routes. |
Request TypesDefine different workflow types for various business processes. Each type has its own stages, routes, and can be linked to any Odoo model. |
Configurable StagesConfigure stages with colors, visibility settings, draft/done flags, and readonly controls to lock fields after certain stages. |
Flexible RoutesDefine transitions with custom button styles (primary, success, danger), descriptions, and conditions for visibility. |
Access ControlControl who can move requests through specific routes using user groups and individual user permissions. |
Server ActionsTrigger automated actions on transitions: open wizards, send emails, update records, or run custom Python code. |
Workflow Configuration Menu
Access all workflow configuration from the Settings menu. Manage Request Types, Stages, and Routes in dedicated views.
Stage Configuration
Configure workflow stages with visibility, draft/done flags, colors, and more. Stages can be reordered using drag-and-drop.
Stage Details with Routes
Each stage shows its incoming and outgoing routes. Configure readonly behavior using Python expressions.
Routes Configuration
Define all transitions between stages. Configure button styles, descriptions, server actions, and access controls.
Route Details with Actions
Configure each route with allowed groups, allowed users, server actions (like opening a wizard), and button appearance.
Route Configuration Details
Each route (transition) can be fully configured with access controls and automated actions.
Allowed GroupsRestrict who can use this route by selecting specific security groups. Only users belonging to these groups will see and be able to click the button. Example: Only "Sales Manager" group can approve quotes. |
Allowed UsersFor fine-grained control, specify individual users who can use this route. Useful for specific approval chains or delegation. Example: Only the CEO and CFO can approve expenses over $10,000. |
Condition Visible ButtonA Python expression that determines if the button is visible. The expression has access to the record ( Example: |
Button ClassControl the button appearance with Bootstrap classes:
|
Server Actions on Routes
Attach powerful server actions to routes to automate tasks when a transition occurs. Actions are executed before the stage change.
Available Server Action Types
Odoo provides multiple action types that can be triggered on route transitions:
Execute CodeRun custom Python code. Access |
Send Email / SMSAutomatically send email or SMS notifications when transitioning. Use email templates with dynamic content. |
Update RecordModify field values on the current record or related records. Set dates, update status fields, assign users, etc. |
Create ActivitySchedule follow-up activities (tasks, calls, meetings) for users when a transition occurs. |
Add/Remove FollowersManage document followers dynamically. Add managers as followers on approval, remove on completion. |
Create RecordCreate new records in any model. Generate invoices, create tasks, log entries automatically. |
Send WebhookSend HTTP requests to external systems. Integrate with third-party applications, trigger external workflows. |
Execute Existing ActionsChain multiple server actions together. Reuse existing actions for complex multi-step automations. |
Demo Request Module
Complete demonstration included! The module ships with a demo.request model showcasing all features:
Demo Request - Draft Stage
New requests start in Draft stage with editable fields and a "Submit" button to move to Pending.
Demo Request - Pending Stage
After submission, the request shows Approve and Reject buttons. Fields become readonly based on stage configuration.
Rejection Wizard
Routes can trigger server actions like opening a wizard. The Reject route opens a wizard to capture the rejection reason.
How to Use
-
Install the module
Install Workflow Base from the Apps menu. Demo data will create a sample workflow. -
Create a Request Type
Go to Settings > Workflow Configuration > Request Types. Link it to your model. -
Design Your Workflow
Use the visual Workflow Designer tab to create stages and connect them with routes. -
Configure Stages
Set colors, readonly behavior ({'all': True}), draft/done flags, and visibility. -
Define Routes
Configure button styles, access rights (groups/users), and optional server actions. -
Inherit in Your Model
Add workflow capabilities with Python inheritance (see example below).
Quick Start Example
stage_route_out_widget field to your form view to display action buttons, and use readonly="can_readonly" on fields that should lock after certain stages.
from odoo import models, fields
class MyRequest(models.Model):
_name = 'my.request'
_inherit = ['request.request', 'mail.thread']
_description = 'My Custom Request'
name = fields.Char(string='Name', required=True)
description = fields.Text(string='Description')
requester_id = fields.Many2one('res.users', default=lambda self: self.env.user)
# Inherited from request.request:
# - type_id: linked Request Type
# - stage_id: current workflow stage
# - can_readonly: boolean computed from stage
# - stage_route_out_json: available action buttons
In your XML form view:
<form>
<header>
<!-- Action buttons appear here automatically -->
<field name="stage_route_out_json" widget="stage_route_out_widget"/>
<field name="stage_id" widget="statusbar" options="{'clickable': '0'}"/>
</header>
<sheet>
<group>
<!-- Fields become readonly based on stage -->
<field name="name" readonly="can_readonly"/>
<field name="description" readonly="can_readonly"/>
</group>
</sheet>
<chatter/>
</form>
Technical Details
Models
|
Dependencies
|
Requirements
- Odoo 18.0 (Community or Enterprise)
- Base module
- Mail module (for activity tracking)
Please log in to comment on this module