Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Technical
  3. Dynamic Approval Workflow v 19.0
  4. Sales Conditions FAQ

Dynamic Approval Workflow

by Abdalrahman Shahrour https://github.com/AbdelrahmanShahrour
Odoo
In-App Purchases
v 19.0 Third Party 109
Download for v 19.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Discuss (mail)
• Invoicing (account)
Lines of code 2361
Technical Name dynamic_approval_workflow
LicenseLGPL-3
Websitehttps://github.com/AbdelrahmanShahrour
Versions 18.0 19.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Discuss (mail)
• Invoicing (account)
Lines of code 2361
Technical Name dynamic_approval_workflow
LicenseLGPL-3
Websitehttps://github.com/AbdelrahmanShahrour
Versions 18.0 19.0
Dynamic Approval Workflow icon

Dynamic Approval Workflow Engine

A reusable, configurable multi-stage approval engine for any Odoo model. Configure once, enforce everywhere, and keep a full audit trail.

Odoo 19 Community & Enterprise No Per-Model Workflow Coding
∞
Models Supported
Use the same approval engine across any supported Odoo model.
3
Approver Types
Specific user, security group, or dynamic user field.
100%
Audit Covered
Every approval decision is tracked with full history.
0
Workflow Code Per Model
Configure workflows from the UI without per-model approval logic.

What This Module Does

Stop building approval logic one module at a time. Define your approval chains in the UI, and let the engine handle submission, routing, stage progression, notifications, escalation, and approval history automatically.

Multi-Stage Sequential Workflows

Configure unlimited stages per workflow. Stage 2 does not start until Stage 1 is completed.

Domain-Based Routing

Apply different workflows to different records of the same model using standard Odoo domains.

Three Flexible Approver Types

Use a specific user, a security group, or a dynamic user field directly from the document.

Immutable Audit Trail

Every approval, rejection, and return action is recorded with user, time, and reason.

Escalation and Deadlines

Flag overdue requests and notify escalation contacts through a scheduled cron job.

Live Dashboard

A dedicated dashboard gives requesters and approvers clear visibility into pending work.

How It Works

1. Configure Workflow

Select the target model, add an optional domain, and define escalation timing.

2. Add Stages

Define the sequence and approver type for each stage in the workflow.

3. Submit Document

The engine creates the approval request, activates the first stage, and sends notifications.

4. Approve or Return

Approvers act from the dashboard or request form, and the document advances automatically.

Document State Lifecycle

Every document moves through a clear approval lifecycle, from initial submission to final decision.

Draft
Initial State
Pending Approval
Waiting
Approved
Completed
Rejected
Blocked
Returned
Needs Update

Draft documents can be submitted for approval. Pending Approval blocks confirmation until approvers act. Approved documents can proceed. Rejected documents are blocked. Returned documents can be edited and resubmitted.

See It in Action

Below is a complete walkthrough from configuration to approval using screenshots from an Odoo 19 environment.

Phase 1. Setup and Configuration

1. Grant User Access Rights

User access rights

Assign Approval Manager or Approval User access before using the module.

2. Open the Approvals App

Approvals app on home screen

The app becomes available after installation for users with the proper role.

3. Configure Approval Workflows

Approval workflows list

Create workflows for any model without writing approval logic per model.

4. Inspect Workflow Configuration

Sales order approval workflow configuration

Review model, domain, escalation days, and stage setup in one form.

Phase 2. Submitting a Document

5. Submit the Sales Order for Approval

Submit sales order for approval

The Submit for Approval button appears while the document is still editable.

6. Order is Now Pending Approval

Sales order pending approval

The status badge changes and a linked approval request is created automatically.

7. Confirmation is Blocked Until Approved

Confirmation blocked until approved

The engine prevents confirmation while the request is still waiting for approval.

Phase 3. Dashboard and Decision

8. My Approvals Dashboard

Approvals dashboard

Approvers can filter, review, and act on pending requests from one place.

9. Review and Act on the Request

Approval request form

Approve, Reject, or Return to Requester with full context and audit history.

Phase 4. Full Audit Trail

10. All Approval Requests

All approval requests

Managers can review the full lifecycle across all requests and statuses.

Three Ways to Define Approvers

Specific User

Always route a stage to a fixed Odoo user.

Example: CFO approval

Security Group

Route a stage to a group, with support for any member or all members.

Example: Sales Managers group

Dynamic Field

Resolve the approver from a user field on the document itself.

Example: Assigned salesperson or direct manager

Complete Audit Trail

Every decision is logged with the stage, approver, action, and reason. This makes the module suitable for internal controls, compliance review, and dispute handling.

Date and Time Stage Approver Action Reason
2025-03-10 09:14Sales Manager ApprovalJohn SmithApproved-
2025-03-10 14:22Finance ReviewJane DoeReturnedMissing cost breakdown
2025-03-11 10:00Sales Manager ApprovalJohn SmithApproved-
2025-03-11 15:30Finance ReviewJane DoeApproved-
2025-03-12 08:05CEO Sign-offAhmad Al-SharourApproved-

Built for Every Team

Sales Orders

Prevent order confirmation until the correct approval chain is completed.

Purchase Orders

Require manager and finance sign-off before confirming procurement documents.

Employee Expenses

Route requests dynamically based on the employee and their reporting structure.

Leave Requests

Use different approval policies by leave type, duration, or department.

Manufacturing Orders

Require operational, quality, or safety approval before production starts.

Custom Models

Enable approval flows on custom business objects with a reusable mixin.

Technical Specifications

Odoo Version19.0
Module Version1.0.0
EditionCommunity and Enterprise
LicenseLGPL-3
Dependenciesbase, mail, base_automation, sale
FrontendOWL
Multi-CompanySupported
Demo DataIncluded
AuthorAbdalrahman Shahrour

Developer Integration Guide

Any model can join the approval engine by inheriting the mixin, adding the dependency, exposing the approval fields in the form, and creating an approval workflow configuration.

1. Add the mixin to your model

from odoo import _, api, fields, models
from odoo.exceptions import UserError

class MyModel(models.Model):
    _name = "my.model"
    _description = "My Model"
    _inherit = [
        "approval.mixin",
        "mail.thread",
        "mail.activity.mixin",
    ]

2. Add the dependency in the manifest

{
    "name": "My Module",
    "version": "19.0.1.0.0",
    "depends": [
        "dynamic_approval_workflow",
        "mail",
    ],
}

3. Add the submit button and status badge in the form view

<button name="action_submit_for_approval"
        type="object"
        string="Submit for Approval"
        class="btn-secondary"
        invisible="state != 'draft' or approval_state not in ('draft', 'returned')"/>

<field name="approval_state"
       readonly="1"
       widget="badge"/>

4. Gate the final confirmation action

def action_confirm(self):
    for record in self:
        config = record._get_approval_config()
        if not config:
            continue
        if record.approval_state == "approved":
            continue
        if record.approval_state in ("draft", "returned"):
            raise UserError(_("Submit \"%s\" for approval before confirming.") % record.display_name)
        if record.approval_state == "pending_approval":
            raise UserError(_("\"%s\" is still awaiting approval.") % record.display_name)
        if record.approval_state == "rejected":
            raise UserError(_("\"%s\" was rejected. Return to draft and resubmit.") % record.display_name)
    return super().action_confirm()

Ready to Bring Order to Your Approvals?

Install once, configure in minutes, and use one approval engine across sales, purchasing, HR, manufacturing, and custom models.

No per-model custom workflow logic Full audit trail Reusable on any supported model Multi-company ready

Dynamic Approval Workflow v19.0.1.0.0 | LGPL-3 | Built by Abdalrahman Shahrour

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with