summaryrefslogtreecommitdiff
path: root/addons/web/models/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/models/models.py')
-rw-r--r--addons/web/models/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/models/models.py b/addons/web/models/models.py
index 3ef871cabe0..0d03d950b9f 100644
--- a/addons/web/models/models.py
+++ b/addons/web/models/models.py
@@ -39,7 +39,7 @@ class Base(models.AbstractModel):
'length': 0,
'records': []
}
- if limit and len(records) == limit:
+ if limit and (len(records) == limit or self.env.context.get('force_search_count')):
length = self.search_count(domain)
else:
length = len(records) + offset