You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
586 B

  1. # -*- coding: utf-8 -*-
  2. # © 2015 Antiun Ingeniería S.L. (http://www.antiun.com)
  3. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
  4. from openerp import http
  5. from openerp.addons.mass_mailing.controllers.main import MassMailController
  6. class CustomUnsuscribe(MassMailController):
  7. @http.route()
  8. def mailing(self, *args, **kwargs):
  9. path = "/page/mass_mail_unsubscription_%s"
  10. result = super(CustomUnsuscribe, self).mailing(*args, **kwargs)
  11. return http.local_redirect(
  12. path % ("success" if result.data == "OK" else "failure"))