summaryrefslogtreecommitdiff
path: root/odoo/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'odoo/models.py')
-rw-r--r--odoo/models.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/odoo/models.py b/odoo/models.py
index b1cb70599c9..7178f27f24c 100644
--- a/odoo/models.py
+++ b/odoo/models.py
@@ -3102,6 +3102,9 @@ Fields:
if self._uid == SUPERUSER_ID:
return self
+ if not self._ids:
+ return self
+
if self.is_transient():
# Only one single implicit access rule for transient models: owner only!
# This is ok to hardcode because we assert that TransientModels always