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-25 09:26:56 +0100
commit9ecd80eaeb28880e989eee10e1a543746e46f036 (patch)
tree62845dd304054745df54f4410d0170a57d434ffb /addons/website/controllers/main.py
parentd4e5019ec74231a92d7759b69c775e5e7577259b (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] Cherry-pick/backport of de8296c3a86da5e4ae35edcdb563d317dac32e76
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 3862d19f0f8..731b7488200 100644
--- a/addons/website/controllers/main.py
+++ b/addons/website/controllers/main.py
@@ -122,9 +122,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)