From 354012203ebbebd17af536ceb9df344e6195c407 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Fri, 9 Jan 2015 12:35:12 +0200 Subject: [PATCH] [IMP] show count of records --- models.py | 4 +++- static/src/xml/main.xml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/models.py b/models.py index 8a40d0d..4223ad8 100644 --- a/models.py +++ b/models.py @@ -78,8 +78,10 @@ Slice - use "domain" for total and "won_domain" for target } obj = self.env[self.model_id.model] if self.type == 'list': + total_count = obj.search_count(domain) res.update({ - 'more': self.limit and self.limit < obj.search_count(domain), + 'more': self.limit and self.limit < total_count, + 'total_count': total_count, 'lines': [], }) for r in obj.search(domain, limit=self.limit, order=self.order): diff --git a/static/src/xml/main.xml b/static/src/xml/main.xml index d43a562..c4c1f3e 100644 --- a/static/src/xml/main.xml +++ b/static/src/xml/main.xml @@ -8,7 +8,7 @@
e -

+

()