[FIX] email_marketing: unsubscribe button does not work in test mode (#596)

A lot of customer are writting ticket with this issue:
When sending a TEST mail marketing from a campaign, they received a
403 error - Access Denied.

It's happening because the res_id is equal 0 and _valid_unsubscribe_token
from mass mailing controller is expecting it to be <> 0.
The res_id is given by the recipient dropdown of the mass mailing campaign
that allows Odoo to match a known record in Odoo.

opw-2202026
This commit is contained in:
bve-odoo 2020-03-13 10:52:19 +01:00 committed by GitHub
parent e495d8dfe2
commit 3300e665b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,10 +15,13 @@ unsubscribing*.
:align: center
:alt: Blacklist in Odoo Email Marketing
Now, once the user clicks on the *Unsubscribe* link on your email, he will be redirected to the
following page:
.. note::
After clicking the unsubscribe button when using the test feature, you will be sent to
an error page (error 403 - Access Denied). If you want to be sure the link is working properly,
you should create your mass mail and then send it only to a personal email.
.. image:: media/manage2.png
:align: center
@ -29,7 +32,6 @@ following page:
In addition to having the option of unsubscribing from specific mailing lists, the user can also
blacklist himself, meaning that he will not receive *any* more emails from you.
.. note::
The mailing list has to be configured as *Public* in order to be visible for users.