Skip to content

Commit 8a65be7

Browse files
committed
[FIX] website,*: remove useless route from sitemap
preparation for cleaning of v13 task-2065018 closes odoo#38511 Signed-off-by: Jérémy Kersten (jke) <[email protected]>
1 parent e1c2bbe commit 8a65be7

File tree

12 files changed

+21
-18
lines changed

12 files changed

+21
-18
lines changed

addons/project/controllers/rating.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class RatingProject(http.Controller):
1111

12-
@http.route(['/project/rating/'], type='http', auth="public", website=True)
12+
@http.route(['/project/rating'], type='http', auth="public", website=True)
1313
def index(self, **kw):
1414
projects = request.env['project.project'].sudo().search([('rating_status', '!=', 'no'), ('portal_show_rating', '=', True)])
1515
values = {'projects': projects}

addons/survey/controllers/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def submit(self, survey, **post):
247247
# Printing routes
248248
@http.route(['/survey/print/<model("survey.survey"):survey>',
249249
'/survey/print/<model("survey.survey"):survey>/<string:token>'],
250-
type='http', auth='public', website=True)
250+
type='http', auth='public', website=True, sitemap=False)
251251
def print_survey(self, survey, token=None, **post):
252252
'''Display an survey in printable view; if <token> is set, it will
253253
grab the answers of the user_input_id that has <token>.'''

addons/test_website/controllers/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88

99
class WebsiteTest(Home):
1010

11-
@http.route('/test_view', type='http', auth="public", website=True)
11+
@http.route('/test_view', type='http', auth="public", website=True, sitemap=False)
1212
def test_view(self, **kw):
1313
return request.render('test_website.test_view')

addons/test_website/data/test_website_data.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<field name="website_published">True</field>
3535
<field name="url">/test_page_view</field>
3636
<field name="view_id" ref="test_page_view"/>
37+
<field name="website_indexed" eval="False"/>
3738
</record>
3839
<record id="test_view_to_be_t_called" model="ir.ui.view">
3940
<field name="name">Test View To Be t-called</field>

addons/website/controllers/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def content_image(self, id=None, max_width=0, max_height=0, **kw):
470470
kw['unique'] = unique
471471
return Binary().content_image(**kw)
472472

473-
@http.route(['/favicon.ico'], type='http', auth='public', website=True)
473+
@http.route(['/favicon.ico'], type='http', auth='public', website=True, sitemap=False)
474474
def favicon(self, **kw):
475475
# when opening a pdf in chrome, chrome tries to open the default favicon url
476476
return self.content_image(model='website', id=str(request.website.id), field='favicon', **kw)

addons/website_crm/views/website_crm_templates.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
<field name="name">Thanks (Contact us)</field>
5555
<field name="type">qweb</field>
5656
<field name="url">/contactus-thank-you</field>
57+
<field name="website_indexed" eval="False"/>
5758
<field name="website_published">True</field>
5859
<field name="key">website_crm.contactus_thanks</field>
5960
<field name="arch" type="xml">

addons/website_google_map/controllers/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class GoogleMap(http.Controller):
2424
directives ``width`` and ``height``.
2525
'''
2626

27-
@http.route(['/google_map'], type='http', auth="public", website=True)
27+
@http.route(['/google_map'], type='http', auth="public", website=True, sitemap=False)
2828
def google_map(self, *arg, **post):
2929
clean_ids = []
3030
for partner_id in post.get('partner_ids', "").split(","):

addons/website_hr_recruitment/views/website_hr_recruitment_templates.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@
381381

382382
<record id="thankyou" model="website.page">
383383
<field name="url">/job-thank-you</field>
384+
<field name="website_indexed" eval="False"/>
384385
<field name="website_published">True</field>
385386
<field name="name">Thank you (Recruitment)</field>
386387
<field name="type">qweb</field>

addons/website_livechat/controllers/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class WebsiteLivechat(http.Controller):
99

10-
@http.route('/livechat/', type='http', auth="public", website=True)
10+
@http.route('/livechat', type='http', auth="public", website=True)
1111
def channel_list(self, **kw):
1212
# display the list of the channel
1313
channels = request.env['im_livechat.channel'].search([('website_published', '=', True)])

addons/website_sale/controllers/main.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def pricelist(self, promo, **post):
358358
request.website.sale_get_order(code=promo)
359359
return request.redirect(redirect)
360360

361-
@http.route(['/shop/cart'], type='http', auth="public", website=True)
361+
@http.route(['/shop/cart'], type='http', auth="public", website=True, sitemap=False)
362362
def cart(self, access_token=None, revive='', **post):
363363
"""
364364
Main cart management + abandoned cart revival
@@ -625,7 +625,7 @@ def values_postprocess(self, order, mode, values, errors, error_msg):
625625

626626
return new_values, errors, error_msg
627627

628-
@http.route(['/shop/address'], type='http', methods=['GET', 'POST'], auth="public", website=True)
628+
@http.route(['/shop/address'], type='http', methods=['GET', 'POST'], auth="public", website=True, sitemap=False)
629629
def address(self, **kw):
630630
Partner = request.env['res.partner'].with_context(show_address=1).sudo()
631631
order = request.website.sale_get_order()
@@ -712,7 +712,7 @@ def address(self, **kw):
712712
}
713713
return request.render("website_sale.address", render_values)
714714

715-
@http.route(['/shop/checkout'], type='http', auth="public", website=True)
715+
@http.route(['/shop/checkout'], type='http', auth="public", website=True, sitemap=False)
716716
def checkout(self, **post):
717717
order = request.website.sale_get_order()
718718

@@ -739,7 +739,7 @@ def checkout(self, **post):
739739
return 'ok'
740740
return request.render("website_sale.checkout", values)
741741

742-
@http.route(['/shop/confirm_order'], type='http', auth="public", website=True)
742+
@http.route(['/shop/confirm_order'], type='http', auth="public", website=True, sitemap=False)
743743
def confirm_order(self, **post):
744744
order = request.website.sale_get_order()
745745

@@ -760,7 +760,7 @@ def confirm_order(self, **post):
760760
# ------------------------------------------------------
761761
# Extra step
762762
# ------------------------------------------------------
763-
@http.route(['/shop/extra_info'], type='http', auth="public", website=True)
763+
@http.route(['/shop/extra_info'], type='http', auth="public", website=True, sitemap=False)
764764
def extra_info(self, **post):
765765
# Check that this option is activated
766766
extra_step = request.website.viewref('website_sale.extra_info_option')
@@ -828,7 +828,7 @@ def _get_shop_payment_values(self, order, **kwargs):
828828

829829
return values
830830

831-
@http.route(['/shop/payment'], type='http', auth="public", website=True)
831+
@http.route(['/shop/payment'], type='http', auth="public", website=True, sitemap=False)
832832
def payment(self, **post):
833833
""" Payment step. This page proposes several payment means based on available
834834
payment.acquirer. State at this point :
@@ -912,7 +912,7 @@ def payment_transaction(self, acquirer_id, save_token=False, so_id=None, access_
912912
request.session['__website_sale_last_tx_id'] = transaction.id
913913
return transaction.render_sale_button(order)
914914

915-
@http.route('/shop/payment/token', type='http', auth='public', website=True)
915+
@http.route('/shop/payment/token', type='http', auth='public', website=True, sitemap=False)
916916
def payment_token(self, pm_id=None, **kwargs):
917917
""" Method that handles payment using saved tokens
918918
@@ -953,7 +953,7 @@ def payment_get_status(self, sale_order_id, **post):
953953
})
954954
}
955955

956-
@http.route('/shop/payment/validate', type='http', auth="public", website=True)
956+
@http.route('/shop/payment/validate', type='http', auth="public", website=True, sitemap=False)
957957
def payment_validate(self, transaction_id=None, sale_order_id=None, **post):
958958
""" Method that should be called by the server when receiving an update
959959
for a transaction. State at this point :
@@ -993,7 +993,7 @@ def payment_validate(self, transaction_id=None, sale_order_id=None, **post):
993993
def terms(self, **kw):
994994
return request.render("website_sale.terms")
995995

996-
@http.route(['/shop/confirmation'], type='http', auth="public", website=True)
996+
@http.route(['/shop/confirmation'], type='http', auth="public", website=True, sitemap=False)
997997
def payment_confirmation(self, **post):
998998
""" End of checkout process controller. Confirmation is basically seing
999999
the status of a sale.order. State at this point :
@@ -1009,7 +1009,7 @@ def payment_confirmation(self, **post):
10091009
else:
10101010
return request.redirect('/shop')
10111011

1012-
@http.route(['/shop/print'], type='http', auth="public", website=True)
1012+
@http.route(['/shop/print'], type='http', auth="public", website=True, sitemap=False)
10131013
def print_saleorder(self, **kwargs):
10141014
sale_order_id = request.session.get('sale_last_order_id')
10151015
if sale_order_id:

0 commit comments

Comments
 (0)