| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 4371 |
| Technical Name |
aibest_approval_workflow |
| License | OPL-1 |
| Versions | 18.0 19.0 |
Approval Workflow Pro
The Ultimate BPMN 2.0 Workflow Engine for Odoo
Take Control of Your Business Process
Approval Workflow Pro allows you to build custom approval logic for Sales, Purchase, Payments, or any Odoo model. Stop relying on emails or rigid native settings.
Purchase Control
"If a PO is under $1,000, auto-approve. If it's over $5,000, require the Manager's sign-off. If over $20,000, require the Director."
Payment Release
Ensure no payment is posted without Finance validation. Configure multi-level signatures for large vendor bills.
Contract / HR
Manage Leave Requests, Expense Reports, or Contract Validations with visual, transparent flowcharts.
Why do you need this module?
Replace confusion with clarity. Move from rigid processes to dynamic automation.
Complex Logic Handling
Native Odoo approvals are linear. We support Conditional Branching (XOR) and Parallel Approvals (AND).
Visual Transparency
Stop guessing "Who has the document?". Users can see the Live Flowchart directly on the record.
Centralized Control
Don't jump between apps. Use our Workbench to approve everything in one unified dashboard.
Drag, Drop, Done.
Design complex corporate workflows visually without writing a single line of code. Full compliance with BPMN 2.0 standards.
Modern User Workbench
Built with the Odoo Owl Framework for lightning-fast performance.
Centralized To-Do
Consolidate approvals from Purchase, Sales, Expenses, and HR into a single dashboard.
Audit History
Full traceability of every request you initiated or approved with timestamps.
Mobile Ready
Fully responsive design ensures you can approve requests from anywhere.
Seamless Integration
The module injects an approval bar directly into the native form view. No context switching required. Supports any Odoo model.
Advanced Automation & Python
For developers and power users: Expose full control via safe Python expressions.
Use code to determine approvers based on Record Amount, Department, or custom logic.
Trigger server actions on Approve, Reject, or
Create (e.g., Send SMS, Update Status).
Need Customization or Support?
We provide direct developer support to ensure your success.
lu758452981@gmail.comTypical response time: Within 24 hours
BPMN 2.0 Workflow Engine - User & Admin Guide
Table of Contents
1. System Overview
This system is an enterprise-grade Approval Workflow Engine deeply integrated with Odoo 18. It supports BPMN 2.0 standard visual design, allowing you to configure flexible flow controls for any business document (e.g., Purchase Orders, Leave Requests, Sales Orders).
Tip
Core Features
- Visual Designer: Drag-and-drop BPMN diagramming. WYSIWYG.
- Versioning: Strict version control ensures running instances are not affected by design changes.
- Deep Integration: Direct manipulation of Odoo records with Python script support.
- Security: Full lifecycle deletion interception and state protection.
2. Workflow Workbench (User Guide)
All approval-related operations can be done in "My Workbench".
2.1 Processing To-do Tasks
Go to Workbench > To-do Tasks. This list shows all tasks currently assigned to you.
- Process: Click the list row or the "Process" button to jump to the business document view.
- Action Bar: A workflow control bar will appear at the top of the document form.
- Approve: Pass the current node and move to the next step.
- Reject: Return to the previous node or a specific node. A rejection reason is required.
- Communication: All approval comments and system logs (e.g., "Manager suspended the flow") are recorded in the Chatter on the right side, providing a real-time audit trail.
2.2 Tracking & History
- Initiated by Me: View the status of all flows you started (Running, Completed, Cancelled).
- Recent History: View your past approval records.
- Flowchart Preview: Click "View Flowchart" on the document form to see the current node position, historical path, and comments in real-time.
2.3 Advanced Actions
Depending on permissions, users may perform the following advanced actions:
| Action | Description |
|---|---|
| Transfer | Hand over the current task completely to another user. The responsibility shifts to the assignee. |
| Delegate | Authorize someone else to approve on your behalf. Once they approve, the task responsibility returns to you (or moves next). |
| Add Sign-off | Add a new approver to the current node (Ad-hoc approval). Useful for seeking temporary advice. |
| Remove Participant | Remove other pending approvers from the current node (Reduce sign-off). |
| Revoke/Recall | (Initiator Only) Withdraw the flow to "Draft" state before it finishes, allowing modification and resubmission. |
| Terminate | (Initiator/Admin) Forcefully cancel the flow. The document state becomes "Cancelled". |
3. Workflow Design (Manager Guide)
3.1 Version Lifecycle
To ensure business stability, workflow definitions use a strict version control mechanism:
- Draft: Allows editing of the diagram, node attributes, and transition conditions.
- Active (Published): Click "Publish" to make it live. The diagram becomes Read-Only to prevent errors in running instances.
- Archived: Old versions are automatically archived for historical data reference.
Warning
How to edit a published workflow?
Click the "Duplicate" button on the version record to create a new Draft based on the current version. Modify and publish the new version. New requests will use the new version, while old requests continue on the old version.
3.2 Node Configuration
Select a node and click the ⚙ Config icon to open settings:
- Approver Settings:
- Static: Fixed user (e.g., John Doe).
- Initiator: The user who created the document.
- Initiator's Manager: Automatically looks up the hierarchy in the Employee profile.
- By Rule: Dynamic calculation using Python expressions (e.g., "If amount > 10k, CFO approves; else, Manager").
- Field Permissions: Control Readonly, Required, or Invisible states for form fields at this specific node.
- Button Permissions: Hide native Odoo buttons (e.g., Hide "Edit" button during approval).
3.3 Data Protection
The system provides a high-performance, zero-intrusion global protection mechanism:
Important
Prevent Deletion
In the Workflow Definition, check Prevent deletion of documents in approval.
- Scope: Applies as long as the document has an active workflow instance.
- Effect: When a user tries to delete a record (e.g., from the List View), the system raises an error and blocks it.
- Performance: Uses memory caching to ensure zero impact on non-workflow models (like Logs or Emails).
4. Scripting & Events (Developer Guide)
You can attach Python scripts to nodes for complex logic automation.
4.1 Event Types
| Event Type | Trigger Timing | Task Variable | Use Case |
|---|---|---|---|
| Enter Node | When flow reaches the node, before approver calculation. | None | Update state to "Waiting Approval". |
| Create Task | After the approval task is generated in DB. | Yes (Recordset) | Send Email / SMS / Slack notification. |
| Approve | When user clicks "Approve". | Yes (Current Task) | Data validation, write-back to business fields. |
| Reject | When user clicks "Reject". | Yes (Current Task) | Enforce rejection reason format. |
| Leave Node | When flow leaves the node. | Yes (Triggering Task) | Log timestamps. |
4.2 Context Variables
The following variables are available in the script editor:
- env: Odoo Environment object.
- record: Current business record (e.g., purchase.order(1,)).
- instance: Workflow Instance object (workflow.instance).
- task: Current Task object (Available only in specific events, see above).
- user: Current operation user (res.users).
- UserError: Exception class for blocking operations.
4.3 Validation & Interception
To block the workflow (e.g., enforce filling a field before approval), raise a UserError.
# Example: Validate before Approval if not record.date_planned: # Raise error, show red alert on UI, and rollback the transaction raise UserError("Please fill in the [Planned Date] before approval!") # Example: Auto-update status record.write({'state': 'purchase'})
5. Troubleshooting (FAQ)
Note
Q: "No valid approver found" error when submitting?
A: Check the configuration of the first node. If set to "By Rule", ensure the script returns a non-empty res.users recordset. If set to "Manager", ensure the initiator has a Manager set in their Employee profile.
Note
Q: Cannot delete items in Field Permission list?
A: You can only modify configurations in Draft versions. Once published, the system locks deletion to protect data integrity. Please duplicate to a new version to make changes.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module