[FIX] suspend security incorrect uid in env

This commit is contained in:
Dmytro Katyukha
2018-07-04 18:12:22 +03:00
committed by Holger Brunn
parent 61ca98ebe3
commit 310b04bccc
2 changed files with 6 additions and 2 deletions

View File

@@ -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))