[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
This commit is contained in:
parent
d4e5019ec7
commit
9ecd80eaeb
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue