Browse Source

[PORT] Port base_suspend_security to 9.0

pull/333/head
Adrien Peiffer (ACSONE) 9 years ago
parent
commit
8ecba999d9
  1. 2
      base_suspend_security/__openerp__.py
  2. 3
      base_suspend_security/models/ir_model_access.py

2
base_suspend_security/__openerp__.py

@ -30,7 +30,7 @@
"test": [ "test": [
], ],
"auto_install": False, "auto_install": False,
'installable': False,
'installable': True,
"application": False, "application": False,
"external_dependencies": { "external_dependencies": {
'python': [], 'python': [],

3
base_suspend_security/models/ir_model_access.py

@ -24,7 +24,8 @@ from ..base_suspend_security import BaseSuspendSecurityUid
class IrModelAccess(models.Model): class IrModelAccess(models.Model):
_inherit = 'ir.model.access' _inherit = 'ir.model.access'
@tools.ormcache_context(accepted_keys=('lang'))
@tools.ormcache_context('uid', 'model', 'mode', 'raise_exception',
keys=('lang',))
def check(self, cr, uid, model, mode='read', raise_exception=True, def check(self, cr, uid, model, mode='read', raise_exception=True,
context=None): context=None):
if isinstance(uid, BaseSuspendSecurityUid): if isinstance(uid, BaseSuspendSecurityUid):

Loading…
Cancel
Save