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. Extra Tools
  3. Studio Approval Automatic Revoke v 18.0
  4. Sales Conditions FAQ

Studio Approval Automatic Revoke

by JD DEVS
Odoo
In-App Purchases
v 18.0 Third Party 5
Download for v 18.0 Deploy on Odoo.sh
This module requires Odoo Enterprise Edition.
Apps purchases are linked to your Odoo account, please sign in or sign up first.
You bought this module and need support? Click here!
  • Description
  • Manifest
Studio Approval Revoke Demo
Studio Approval Revoke Demo

Studio Approval Automatic Revoke

Studio Approval Automatic Revoke extends the native Odoo 18 Enterprise Studio Approval mechanism by automatically revoking previously granted approvals whenever a configured button is executed. This ensures that temporary approvals remain valid only until the intended business action is completed, preventing users from reusing old approvals indefinitely. The implementation is designed as a lightweight extension that integrates seamlessly with Odoo Studio while maintaining excellent performance, scalability, and upgrade compatibility.

๐Ÿ”„ Execution Flow

  • Administrator enables Revoke Approval for any Buttons or Actions.
  • User requests approval and receives authorization.
  • User performs the approved action.
  • The frontend detects the configured button.
  • The current record is automatically saved if required.
  • A lightweight ORM RPC calls the revoke service.
  • Matching approval entries are removed.
  • The original Odoo button action executes normally.
  • If the user needs to perform the protected operation again, a fresh approval request is required.

โš™๏ธ Backend Model Design

The module introduces a dedicated configuration model studio.approval.revoke that stores revoke mappings independently from Odoo Studio Approval Rules. It acts only as a lightweight configuration layer, keeping business models completely untouched.

  • Dedicated configuration model with minimal fields.
  • Indexed fields (model_name, method, action_id, active) provide efficient lookups.
  • No computed fields.
  • No onchange methods.
  • No stored dependencies.
  • No inheritance of business models.
  • Configuration remains isolated from business documents.

๐Ÿš€ Query Optimization

  • Frequently searched columns are indexed.
  • Uses highly selective ORM domains.
  • limit=1 is used wherever only one configuration record is expected.
  • No expensive joins or aggregation queries.
  • Approval entry searches filter by Model, Rule and Record ID.
  • Configuration lookups remain extremely fast even as business data grows.

๐ŸŒ Controller Architecture

Instead of replacing Web Studio behaviour, the module extends WebStudioController by introducing a single custom operation: enable_revoke_approval. This approach follows Odoo's extension architecture and minimizes maintenance effort during upgrades.

  • No override of Studio's primary editing workflow.
  • No duplication of existing controller logic.
  • Uses Studio's native operation dispatch mechanism.
  • Responsible only for applying revoke metadata to XML views.
  • Minimal impact on future Studio updates.

โšก Batched Service Optimization

The module includes a custom batched service for get_revoke_spec(). Instead of sending multiple RPC requests while Studio loads several configured buttons, requests are automatically grouped into a single ORM call.

  • Combines multiple frontend requests into one RPC.
  • Reduces unnecessary network traffic.
  • Improves Studio sidebar responsiveness.
  • Eliminates duplicate requests during rendering.
  • Uses Deferred synchronization similar to Odoo's own batching strategy.
  • Scales efficiently for large Studio forms containing many buttons.

๐Ÿ”„ Upgrade & Maintainability

  • Extends WebStudioController without replacing its core workflow.
  • Patches only ViewButton and Studio sidebar components.
  • Uses Odoo's official patch mechanism.
  • No override of business models.
  • No override of ORM methods such as create(), write(), unlink(), read(), or search().
  • Minimal impact during future Odoo upgrades.
  • Each component has a single responsibility (Model, Controller, Service and Frontend Patch), making the module easy to maintain.

๐Ÿง  Frontend Patch Design

The frontend extends only ViewButton, which is the exact execution point for button actions. This allows approval cleanup to occur immediately before the original business operation without altering normal Odoo behaviour.

  • Only configured buttons execute additional logic.
  • Standard Odoo buttons remain completely unaffected.
  • Automatically saves unsaved records before revoking approvals.
  • Uses ORM service for secure server communication.
  • Returns execution to super.onClick(), preserving native functionality.
  • Includes error handling to prevent unexpected frontend failures.

โšก Performance Analysis

  • ๐ŸŸข CPU Usage : Very Low
  • ๐ŸŸข Memory Usage : Negligible
  • ๐ŸŸข Database Load : Very Low
  • ๐ŸŸข No background workers.
  • ๐ŸŸข No scheduled jobs.
  • ๐ŸŸข No continuous monitoring processes.
  • ๐ŸŸข Standard Odoo operations remain completely unaffected.

๐Ÿ“ฆ Database Impact

Every configured button click performs approximately:

Configuration Search
โ†“
Approval Entry Search
โ†“
Approval Revoke
โ†“
Original Button Execution
  • Only two lightweight searches.
  • One targeted Revoke operation.
  • No loops across business records.
  • No recursive processing.
  • No XML regeneration.
  • No view rebuilding.
  • No computed field recalculation.
  • No writes on business documents.
  • Database workload remains extremely small.

๐Ÿ“ˆ Scalability

The implementation performs constant-time configuration lookups and highly selective approval searches. Runtime complexity depends only on the clicked record rather than the total number of business records.

  • Suitable for enterprise production environments.
  • Supports MoreThan 200 of concurrent users.
  • Performs efficiently with databases containing hundreds of thousands of business records.
  • Indexed lookups prevent unnecessary full table scans.
  • Performance remains stable regardless of Sales Orders, Purchase Orders or Manufacturing Orders volume etc,...

๐Ÿงพ Final Technical Conclusion

  • โœ” Lightweight extension of Odoo Studio Approval Rules.
  • โœ” Automatic cleanup of temporary approval entries.
  • โœ” Optimized database queries using indexed fields.
  • โœ” Batched frontend service minimizes RPC traffic.
  • โœ” Minimal CPU, memory and database overhead.
  • โœ” No impact on standard business workflows.
  • โœ” Upgrade-friendly architecture using Odoo extension points.
  • โœ” Safe for large-scale Enterprise production deployments.

Steps To Configure: Approval Revoke

Step 1

Step 1

Step 2

Step 2

Our Odoo Services

Customization
Implementation
Support
Integration

Need Help?

Email Us WhatsApp (KSA) WhatsApp (India)
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Studio (web_studio)
• Discuss (mail)
Lines of code 418
Technical Name studio_approval_revoke

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.
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