[FIX] suspend security incorrect uid in env

This commit is contained in:
Dmytro Katyukha
2018-07-04 18:12:22 +03:00
committed by Dmytro Katyukha
parent dc43d8b483
commit 971f2e120f
2 changed files with 6 additions and 2 deletions

View File

@@ -18,7 +18,7 @@
############################################################################## ##############################################################################
{ {
"name": "Suspend security", "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)", "author": "Therp BV, brain-tec AG, Odoo Community Association (OCA)",
"license": "AGPL-3", "license": "AGPL-3",
"category": "Hidden/Dependency", "category": "Hidden/Dependency",

View File

@@ -12,4 +12,8 @@ class Base(models.AbstractModel):
@api.model @api.model
def suspend_security(self): 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))