[MIG] base_suspend_security to 10.0 (#586)

This commit is contained in:
Adrien Peiffer (ACSONE)
2016-10-28 10:00:45 +02:00
committed by Holger Brunn
parent 1a5194c152
commit e719bc627e
9 changed files with 33 additions and 39 deletions

View File

@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
# Copyright 2016 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
from ..base_suspend_security import BaseSuspendSecurityUid
class Base(models.AbstractModel):
_inherit = 'base'
@api.model
def suspend_security(self):
return self.sudo(user=BaseSuspendSecurityUid(self.env.uid))