Community mailing list archives

community@mail.odoo.com

Re: Alternative to .sudo()

by
Manuel A. Márquez
- 09/21/2016 22:47:41
Check this module, I think that's what you need.

https://github.com/OCA/server-tools/tree/9.0/base_suspend_security

On 21/09/16 22:33, vak0160 wrote:
> Hello Community,
> 
> Is there any way to use |.sudo()| method without changing the current user?
> 
> I want to keep the current user for |create_uid| and |write_uid| field
> and the user on |self.env.user| and |self.env.uid|, so that when I
> create / modify a record from a button, the record doesn’t specify
> /Administrator/.
> 
> I recall there is a module to replace |.sudo()| method, but I can’t find
> it anywhere now.
> 
> ​
> 
> -- Regards, Andre
> 
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-59
> Post to: mailto:community@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe
>