[FIX] Sitemap - Back forward from saas-5 5cc1317a5f to have the url_root in sitemap

This commit is contained in:
Jeremy Kersten
2014-06-25 13:38:56 +02:00
parent f68c83545a
commit 1a4bfa28c4
+5 -2
View File
@@ -105,8 +105,11 @@ class Website(openerp.addons.web.controllers.main.Home):
locs = request.website.enumerate_pages()
while True:
start = pages * LOC_PER_SITEMAP
loc_slice = islice(locs, start, start + LOC_PER_SITEMAP)
urls = iuv.render(cr, uid, 'website.sitemap_locs', dict(locs=loc_slice), context=context)
values = {
'locs': islice(locs, start, start + LOC_PER_SITEMAP),
'url_root': request.httprequest.url_root[:-1],
}
urls = iuv.render(cr, uid, 'website.sitemap_locs', values, context=context)
if urls.strip():
page = iuv.render(cr, uid, 'website.sitemap_xml', dict(content=urls), context=context)
if not first_page: