Files
server-backend/base_suspend_security/models/ir_rule.py
2019-02-21 15:23:34 +01:00

16 lines
514 B
Python

# © 2015 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, models
from ..base_suspend_security import BaseSuspendSecurityUid
class IrRule(models.Model):
_inherit = 'ir.rule'
@api.model
def domain_get(self, model_name, mode='read'):
if isinstance(self.env.uid, BaseSuspendSecurityUid):
return [], [], ['"%s"' % self.pool[model_name]._table]
return super(IrRule, self).domain_get(model_name, mode=mode)