When writing business logic code, you may have to perform some actions with a different security context. A typical case is performing an action with the rights of the Administrator, who bypasses security checks.
This recipe shows how to let normal users modify the phone number of a company by using
We will be working on records of the
res.company model. By default, only members of the Administration/Access Rights user group can modify records of
res.company, but in our case, we need to provide an access point to change only the phone number to users who are not necessarily members of that group.
In order to let normal users modify the phone number of a company, you need to perform ...