Jairo Llopis
9 years ago
committed by
David
5 changed files with 104 additions and 20 deletions
-
38mass_mailing_custom_unsubscribe/README.rst
-
2mass_mailing_custom_unsubscribe/__init__.py
-
6mass_mailing_custom_unsubscribe/__manifest__.py
-
15mass_mailing_custom_unsubscribe/controllers.py
-
61mass_mailing_custom_unsubscribe/views/pages.xml
@ -0,0 +1,15 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# © 2015 Antiun Ingeniería S.L. (http://www.antiun.com) |
|||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). |
|||
|
|||
from openerp import http |
|||
from openerp.addons.mass_mailing.controllers.main import MassMailController |
|||
|
|||
|
|||
class CustomUnsuscribe(MassMailController): |
|||
@http.route() |
|||
def mailing(self, *args, **kwargs): |
|||
path = "/page/mass_mail_unsubscription_%s" |
|||
result = super(CustomUnsuscribe, self).mailing(*args, **kwargs) |
|||
return http.local_redirect( |
|||
path % ("success" if result.data == "OK" else "failure")) |
@ -0,0 +1,61 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<openerp> |
|||
<data> |
|||
|
|||
<template name="Unsubscription worked" |
|||
id="website.mass_mail_unsubscription_success" |
|||
page="True"> |
|||
<t t-call="website.layout"> |
|||
<div id="wrap" class="oe_structure oe_empty"> |
|||
<section class="jumbotron mt16 mb16"> |
|||
<div class="container"> |
|||
<h1> |
|||
You were successfully unsubscribed from our |
|||
mailing list. |
|||
</h1> |
|||
<h3 class="text-muted"> |
|||
It's sad to see you go, but if you love |
|||
something, let it go. |
|||
</h3> |
|||
<p> |
|||
However, we are open to suggestions. Please tell us |
|||
why you left. |
|||
</p> |
|||
<p> |
|||
<a class="btn btn-primary btn-lg" |
|||
href="/page/website.contactus">Contact us</a> |
|||
</p> |
|||
</div> |
|||
</section> |
|||
</div> |
|||
</t> |
|||
</template> |
|||
|
|||
<template name="Unsubscription failed" |
|||
id="website.mass_mail_unsubscription_failure" |
|||
page="True"> |
|||
<t t-call="website.layout"> |
|||
<div id="wrap" class="oe_structure oe_empty"> |
|||
<section class="jumbotron mt16 mb16"> |
|||
<div class="container"> |
|||
<h1> |
|||
There was an error processing your unsubscription |
|||
request. |
|||
</h1> |
|||
<p> |
|||
We apologize for the inconvenience. You can contact us |
|||
and we will handle your unsubscription manually. |
|||
</p> |
|||
<p>Thanks for your patience.</p> |
|||
<p> |
|||
<a class="btn btn-primary btn-lg" |
|||
href="/page/website.contactus">Contact us</a> |
|||
</p> |
|||
</div> |
|||
</section> |
|||
</div> |
|||
</t> |
|||
</template> |
|||
|
|||
</data> |
|||
</openerp> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue