From 85ddb867b5183b2d16cded41811123a9fb9dccab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 2 Dec 2021 07:23:54 +0000 Subject: [PATCH] [REM] rating: remove dead controllers ``/rating/`` routes are deprecated since odoo/odoo@8ca96078dbeb61678f8c0656f90b09ab8a82981a (before v14). Let us remove them as we are now going to v16. Task-2812665 (Rating: Cleanup rating flow code) Part-of: odoo/odoo#80707 --- addons/rating/controllers/main.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/addons/rating/controllers/main.py b/addons/rating/controllers/main.py index cfad6cd0b6a..7f075f7b0d4 100644 --- a/addons/rating/controllers/main.py +++ b/addons/rating/controllers/main.py @@ -18,20 +18,6 @@ MAPPED_RATES = { class Rating(http.Controller): - @http.route('/rating//', type='http', auth="public", website=True) - def open_rating(self, token, rate, **kwargs): - _logger.warning('/rating is deprecated, use /rate instead') - assert rate in (1, 5, 10), "Incorrect rating" - return self.action_open_rating(token, MAPPED_RATES.get(rate), **kwargs) - - @http.route(['/rating//submit_feedback'], type="http", auth="public", methods=['post'], website=True) - def submit_rating(self, token, **kwargs): - _logger.warning('/rating is deprecated, use /rate instead') - rate = int(kwargs.get('rate')) - assert rate in (1, 5, 10), "Incorrect rating" - kwargs['rate'] = MAPPED_RATES.gate(rate) - return self.action_submit_rating(token, **kwargs) - @http.route('/rate//', type='http', auth="public", website=True) def action_open_rating(self, token, rate, **kwargs): assert rate in (1, 3, 5), "Incorrect rating"