Skip to content
Snippets Groups Projects
Commit c732a5e4 authored by Raphael Collet's avatar Raphael Collet
Browse files

[FIX] ir_model_access: missing flush() before SQL query

X-original-commit: ba1d04ac8a23a2f3cfad7f332dab96f7e460eb53
parent fe6a4594
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment