mirror of
https://github.com/OCA/server-backend.git
synced 2025-02-18 09:52:42 +02:00
[MIG] base_suspend_security to 10.0 (#586)
This commit is contained in:
committed by
Frédéric Garbely
parent
a34ecbfb0e
commit
c36c7e4f0e
15
base_suspend_security/models/base.py
Normal file
15
base_suspend_security/models/base.py
Normal 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))
|
||||
Reference in New Issue
Block a user