Limiting access to fields (Odoo Studio)

Odoo Studio makes it easy to limit access to specific fields on a Form View.

For this example we’ll limit access to the product cost field

Enable Odoo Studio, click on the “Cost” field and properties are shown in the left-hand panel.

In the bottom left there is the field “Limit Visibility to groups”

For this example, we’ll only allow Sales Managers to see the cost. Of course you can select another group, or multiple groups.

That’s all you need to do.

Technical Notes

Behind the scenes, Odoo Studio creates an Extension View.

We can see this by enabling developer mode and navigating to Settings / Technical / Views. Search for views with “Studio” in the name and for the product.template model

This is an Extension View, and it inherits the product.template.product.form view. It’s a Form View for the product.template model

Architecture (XML)

   <xpath expr="//field[@name='standard_price']" position="attributes">
     <attribute name="groups">sales_team.group_sale_manager</attribute>

sales_team.group_sale_manager is the Sales / Manager role.

Without Studio you could create an Extension View to do the same thing.

4 thoughts on “Limiting access to fields (Odoo Studio)

  1. Hej, you can also modify only base view. For instance: Is it equivalent of this you described above? Thanks for tip


  2. Of course you can modify the Base View. It’s simpler and quicker but you need to think what will happen if you apply upgrades.


  3. when trying this in Odoo Studio I get the following error message: “Only groups with an external ID can be used here”.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s