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.
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
This is an Extension View, and it inherits the
product.template.product.form view. It’s a Form View for the
<data> <xpath expr="//field[@name='standard_price']" position="attributes"> <attribute name="groups">sales_team.group_sale_manager</attribute> </xpath> </data>
sales_team.group_sale_manager is the Sales / Manager role.
Without Studio you could create an Extension View to do the same thing.