[FIX] ir_model_access: missing flush() before SQL query
X-original-commit: ba1d04ac8a23a2f3cfad7f332dab96f7e460eb53
This commit is contained in:
@@ -1534,6 +1534,8 @@ class IrModelAccess(models.Model):
|
||||
if model not in self.env:
|
||||
_logger.error('Missing model %s', model)
|
||||
|
||||
self.flush(self._fields)
|
||||
|
||||
# We check if a specific rule exists
|
||||
self._cr.execute("""SELECT MAX(CASE WHEN perm_{mode} THEN 1 ELSE 0 END)
|
||||
FROM ir_model_access a
|
||||
|
||||
Reference in New Issue
Block a user