mirror of
https://github.com/OCA/server-backend.git
synced 2025-02-18 09:52:42 +02:00
[FIX] suspend security incorrect uid in env
This commit is contained in:
committed by
Dmytro Katyukha
parent
dc43d8b483
commit
971f2e120f
@@ -18,7 +18,7 @@
|
||||
##############################################################################
|
||||
{
|
||||
"name": "Suspend security",
|
||||
"version": "11.0.1.0.0",
|
||||
"version": "11.0.1.0.1",
|
||||
"author": "Therp BV, brain-tec AG, Odoo Community Association (OCA)",
|
||||
"license": "AGPL-3",
|
||||
"category": "Hidden/Dependency",
|
||||
|
||||
@@ -12,4 +12,8 @@ class Base(models.AbstractModel):
|
||||
|
||||
@api.model
|
||||
def suspend_security(self):
|
||||
return self.sudo(user=BaseSuspendSecurityUid(self.env.uid))
|
||||
return self.with_env(
|
||||
api.Environment(
|
||||
self.env.cr,
|
||||
BaseSuspendSecurityUid(self.env.uid),
|
||||
self.env.context))
|
||||
|
||||
Reference in New Issue
Block a user