Community mailing list archives

community@mail.odoo.com

Re: Alternative to .sudo()

by
Shine IT Co.,Ltd., Tony Gu
- 09/21/2016 23:07:44
Hi Andre,

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

I guess this is what you request for.

Best regards,

Tony Gu
在 2016年9月22日,上午10:33,vak0160 <vak0160.work@gmail.com> 写道:

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