diff --git a/addons/mail/controllers/main.py b/addons/mail/controllers/main.py index dbf6f23e031..b9f0d8e8abc 100644 --- a/addons/mail/controllers/main.py +++ b/addons/mail/controllers/main.py @@ -191,38 +191,6 @@ class MailController(http.Controller): return self._redirect_to_record(model, res_id, access_token) - @http.route('/mail/follow', type='http', auth='user', methods=['GET']) - def mail_action_follow(self, model, res_id, token=None): - comparison, record, redirect = self._check_token_and_record_or_redirect(model, int(res_id), token) - if comparison and record: - try: - record.sudo().message_subscribe_users() - except Exception: - return self._redirect_to_messaging() - return redirect - - @http.route('/mail/unfollow', type='http', auth='user', methods=['GET']) - def mail_action_unfollow(self, model, res_id, token=None): - comparison, record, redirect = self._check_token_and_record_or_redirect(model, int(res_id), token) - if comparison and record: - try: - # TDE CHECKME: is sudo really necessary ? - record.sudo().message_unsubscribe_users([request.uid]) - except Exception: - return self._redirect_to_messaging() - return redirect - - @http.route('/mail/new', type='http', auth='user') - def mail_action_new(self, model, res_id, action_id): - # TDE NOTE: this controller is deprecated and will disappear before v11. - if model not in request.env: - return self._redirect_to_messaging() - params = {'view_type': 'form', 'model': model} - if action_id: - # Probably something to do - params['action'] = action_id - return werkzeug.utils.redirect('/web?#%s' % url_encode(params)) - @http.route('/mail/assign', type='http', auth='user', methods=['GET']) def mail_action_assign(self, model, res_id, token=None): comparison, record, redirect = self._check_token_and_record_or_redirect(model, int(res_id), token)