One way to limit users from accessing cost prices is to simply hide the fields by limiting visibility to specific groups. But this does not take away the possibility to export the field from a list view. How do we still allow the user to export the other fields from the view without the restricted field?
Toon van der Ploeg
def fields_get(self, fields=None):
fields_to_hide = ['field1','field2'] //Fields to Hide
res = super(ClassName, self).fields_get()
for field in fields_to_hide:
res[field]['exportable'] = False
Hope It Helps,
In .py file you can add the groups to a specific field so that it will not be visible while exporting also.
Adding this will make the field accessible only to "base.group_no_one" group users.