There's more...

You need to be extra careful when you use sudo() because it bypasses all the access rights. In a multi-company environment, it can create issues if you don't use it properly. If you want to access the record set as another user, you can pass the ID of that user in sudo, such as self.sudo(uid). This will return a recordset with the environment of that user. This way, it will not bypass all access rules and record rules, but you can perform all the actions that are allowed to that user.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset