Skip to content

Commit

Permalink
[FIX] product_management_group: Fix bug in the cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomacr committed Jan 27, 2022
1 parent 81fa370 commit 967e87e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions product_management_group/models/ir_model_access.py
Expand Up @@ -10,10 +10,8 @@ class IrModelAccess(models.Model):
_inherit = 'ir.model.access'

@api.model
@tools.ormcache_context(
'self._uid', 'model', 'mode', 'raise_exception', keys=('lang',))
def check(
self, model, mode='read', raise_exception=True):
@tools.ormcache_context('self.env.uid', 'self.env.su', 'model', 'mode', 'raise_exception', keys=('lang',))
def check(self, model, mode='read', raise_exception=True):

if isinstance(model, models.BaseModel):
assert model._name == 'ir.model', 'Invalid model object'
Expand Down

0 comments on commit 967e87e

Please sign in to comment.