I want to make field readony based on group, and status.
Like i have two grops 1. Manager Group 2. User Group
If I give User Group to any <
In case if you are using Odoo web client(GUI) instead of code then there is a bit unorthodox way to do it.
Just make a copy of the field which will contain same value as the original one(giving original field name in Related Field
under Advanced Properties
) and mark it as read-only.
Then you can hide original field from the users which cannot edit that field and hide the copy field from those who can edit by using groups attribute.