summaryrefslogtreecommitdiff
path: root/addons/website/controllers/main.py
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2016-02-01 16:37:57 +0100
committerJeremy Kersten <jke@odoo.com>2016-02-01 17:12:14 +0100
commitde8296c3a86da5e4ae35edcdb563d317dac32e76 (patch)
tree0eff423a9f2618e94fe382070d06faeae06db2a7 /addons/website/controllers/main.py
parent274cbda5b0a5b47c6682e27bdea144fd9c3c90f1 (diff)
[FIX] website: sitemap fix length
Iterator was consuming the first 45k records. So don't need to specify an offset, because that will ignore the next 45k. Eg: if step of 5, and range(1,13), it will only use [1, 2, 3, 4, 5, 11, 12, 13]
Diffstat (limited to 'addons/website/controllers/main.py')
-rw-r--r--addons/website/controllers/main.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py
index c44ae20e117..712aa271a45 100644
--- a/addons/website/controllers/main.py
+++ b/addons/website/controllers/main.py
@@ -132,9 +132,8 @@ class Website(openerp.addons.web.controllers.main.Home):
first_page = None
locs = request.website.sudo(user=request.website.user_id.id).enumerate_pages()
while True:
- start = pages * LOC_PER_SITEMAP
values = {
- 'locs': islice(locs, start, start + LOC_PER_SITEMAP),
+ 'locs': islice(locs, 0, LOC_PER_SITEMAP),
'url_root': request.httprequest.url_root[:-1],
}
urls = iuv.render(cr, uid, 'website.sitemap_locs', values, context=context)