Studio: Approval Groups

Purpose

This document covers how to restrict access, or usage of specific action-based elements to certain groups with Approval Groups in Studio for Odoo 15. For example, you can require that users with specific permissions approve a record before it can move to the next stage. You can require multiple users to give approval as well.

Important

Use Studio with Caution

If you have a lot of customizations to your pages and forms, it is Hibou's opinion to have the best practice to make those changes in code rather than via Studio. Studio modifications can cause problems when it comes to upgrading your Odoo instance to a newer version, or implementing future dev. Additionally, changes made in Studio and data added through Studio fields, can be easily overwritten by other users. For assistance in adding changes to code, please contact us!

Process

To see how this works, navigate to the Sales app with Studio enabled.


From the initial view, click on the  Studio icon to open it up.


Once there, click into the  Form view.


Look for the Confirm button. If you don't see it, go to the   View tab and enable  Show Invisible Elements. After a few moments, you'll see all action buttons on the page. The buttons that aren't generally available in this view will have a patterned background.Next, click the CONFIRM button. 


The   Properties tab will open on the left-hand pane after you click the Confirm button. Within that tab, enable  Set Approval Rules.


After a few moments, you'll see an Approval Groups drop-down menu. From the drop-down, select the permission set required for the first approver. Since this is a Sale Order, we'll select the following:

  • Approval Group: Set this to 'Sales / Administrator'.

  • Add a description: Set this to 'Requires Sales Admin Approval'

 To add another approver, click Add an approval rule.


This will add another drop-down where you'll select the permission set for the second approver. You can add as many approval rules as needed. In this case we have done the following:

  • Approval Group: Set this to 'Accounting / Billing'.

  • Add a Description: Set this to 'Requires Accounting Billing Approval'.

 

When you have finished configuring the properties for this view, click Close.


You can easily see how many approvers are required for an action on the record by the user-profile icons displayed. 


Good to Know!

Can Approvers be the Same Person?

Yes, approvers can be the same person if they have both permission sets; however, you can require approvers to be different users by selecting   Limit approver to this rule under each Approval Group setting.


Filtering Records

The  Filter icon can be used to apply the approval rule to records of a specific type.


When clicked, a modal window will display where you then set your criteria. Let's start by clicking + Add filter.


If, for example, we don't want to require approval for any Sales Orders with 'Mitchell Admin' as the Salesperson, we could set the filter as follows:

When you are done, click SAVE to keep this filter.


Click Close.


Now, if this permission group tries to confirm a Sales Order where Mitchell Admin is NOT the salesperson, they'll see an error on the top-right and will not be able to do so.