summaryrefslogtreecommitdiff
path: root/addons/website_profile
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2019-10-22 07:19:44 +0000
committerJeremy Kersten <jke@odoo.com>2019-10-28 10:36:56 +0000
commite19227d3ba9c9296bfc0c221ac70a863a571b9a6 (patch)
tree47130e9859ecb4dd2c60bbf5dede855fd6428c5c /addons/website_profile
parente2176749f6774196c76955319c753f28e849942d (diff)
[IMP] website*: clean sitemap
From now, you need to explicitely add sitemap=True if you want your controller into the sitemap. It's the default value, but if you forgot it, it will raise a Warning on runbot. It will avoid wrong controller in sitemap and duplicate (empty) content. From now, if your model contains a field website_id, the modelConverter for sitemap will automatically add the domain: "[('website_id', 'in', (False, current_website_id))]" It avoid redundant declaration and ugly url in redirect/rewrite view. Migration: need to remove it from url_from in website.rewrite task-2065018 closes odoo/odoo#39427 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/website_profile')
-rw-r--r--addons/website_profile/controllers/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website_profile/controllers/main.py b/addons/website_profile/controllers/main.py
index 8db95836b9f..eef5d1d4dc8 100644
--- a/addons/website_profile/controllers/main.py
+++ b/addons/website_profile/controllers/main.py
@@ -168,7 +168,7 @@ class WebsiteProfile(http.Controller):
domain = expression.AND([[('challenge_ids.category', '=', kwargs.get('badge_category'))], domain])
return domain
- @http.route('/profile/ranks_badges', type='http', auth="public", website=True)
+ @http.route('/profile/ranks_badges', type='http', auth="public", website=True, sitemap=True)
def view_ranks_badges(self, **kwargs):
ranks = []
if 'badge_category' not in kwargs:
@@ -204,7 +204,7 @@ class WebsiteProfile(http.Controller):
return user_values
@http.route(['/profile/users',
- '/profile/users/page/<int:page>'], type='http', auth="public", website=True)
+ '/profile/users/page/<int:page>'], type='http', auth="public", website=True, sitemap=True)
def view_all_users_page(self, page=1, **searches):
User = request.env['res.users']
dom = [('karma', '>', 1), ('website_published', '=', True)]