diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-03-01 14:07:15 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-03-01 14:07:15 +0100 |
| commit | 5c4744cd1fa177eeed679ff4ba46f90b0bc82005 (patch) | |
| tree | 29bb9696176428214631c3f53837ae14a3407e44 /addons/website/controllers | |
| parent | 1730dca101616135dfdc0073520e92506b52a0b0 (diff) | |
| parent | 5f9f4f4d9dbb8222a894548e11f43c6ea7c2c0d0 (diff) | |
[MERGE] forward port branch 9.0 up to 5f9f4f4d9db
Diffstat (limited to 'addons/website/controllers')
| -rw-r--r-- | addons/website/controllers/main.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py index 808ac8c5498..93605087f46 100644 --- a/addons/website/controllers/main.py +++ b/addons/website/controllers/main.py @@ -151,9 +151,12 @@ class Website(openerp.addons.web.controllers.main.Home): # rename the -id-page.xml => -id.xml ira.write(cr, uid, last, dict(url="/sitemap-%d.xml" % current_website.id, name="/sitemap-%d.xml" % current_website.id), context=context) else: + # TODO: in master/saas-15, move current_website_id in template directly + pages_with_website = map(lambda p: "%d-%d" % (current_website.id, p), range(1, pages + 1)) + # Sitemaps must be split in several smaller files with a sitemap index content = iuv.render_template(cr, uid, 'website.sitemap_index_xml', dict( - pages=range(1, pages + 1), + pages=pages_with_website, url_root=request.httprequest.url_root, ), context=context) create_sitemap('/sitemap-%d.xml' % current_website.id, content) |
