You will need to put them in separate security groups. You can then customize the screens to make the fields conditionally visible by adding the groups="visible_group1" attribute (where visible_group1 is the external id of the security group to which the field should be visible). For example,
<field name="standard_price" groups="visible_group1"/>
The groups attribute should contain a comma-separated list of groups which should be able to see the field. Once you add the groups attribute, any group not listed in the list will not be able to see the field.
EDIT:
Here's an example of how to make the Cost field visible only to a user having the Administration/Settings privilege (i.e. base.group_system)
1. Go to the bug icon and select Edit View: Form
2. The underlying view is an extension view. Click on the icon next to the Inherited View field to open the product.template.common.form view in edit mode.
3. Click on the Inherited Views tab, scroll to the bottom and click on Add a line.
4. Enter a custom View Name, for example x_product.template.common.form
5. Put the following code in the field in the Architecture tab. You will need to substitute the group id base.group_system with the external id of your custom security group.
<?xml version="1.0"?>
<data>
<xpath expr="//label[@for='standard_price']" position="attributes">
<attribute name="groups">base.group_system</attribute>
</xpath>
<xpath expr="//div[@name='standard_price_uom']" position="attributes">
<attribute name="groups">base.group_system</attribute>
</xpath>
</data>
Save all the views and reload the form. The Cost field (standard_price) will now be visible only to users who have been added to the Administration/Settings security group.
If you are interested in understanding the details of the technicalities of the customization steps, you may want to read up on the following documentation on Views.
https://www.odoo.com/documentation/13.0/reference/views.html
Great solution Paresh! Thank you.
Thanks Paresh, works perfectly