How can i make field read-only when creating a record based on the group
i need to make field "VAT" readonly if user does not have 2 groups that are described in my method
@api.multi
def _check_pricelist_access_rights(self, vals):
context = self._context or {}
user_id = context.get('uid') or self.env.uid
usr = self.env['res.users'].browse(user_id)
pricelist_obj = self.env['product.pricelist']
if usr.has_group('config.group_hetlita_manager') and not usr.has_group(
'config.group_hetlita_general_manager'):