[FIX] mass_mailing_custom_unsubscribe: contacts model rename
As the mail contacts model is renamed, we need to update the Reference field data with it. TT30414
This commit is contained in:
parent
a7e866ba7f
commit
2543d73274
@ -6,7 +6,7 @@
|
||||
"name": "Customizable unsubscription process on mass mailing emails",
|
||||
"summary": "Know and track (un)subscription reasons, GDPR compliant",
|
||||
"category": "Marketing",
|
||||
"version": "13.0.1.0.2",
|
||||
"version": "13.0.2.0.0",
|
||||
"depends": ["mass_mailing"],
|
||||
"data": [
|
||||
"security/ir.model.access.csv",
|
||||
|
@ -0,0 +1,17 @@
|
||||
# Copyright 2021 Tecnativa - David Vidal
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
from openupgradelib import openupgrade
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
openupgrade.logged_query(
|
||||
env.cr,
|
||||
"""
|
||||
UPDATE mail_unsubscription
|
||||
SET unsubscriber_id = replace(
|
||||
unsubscriber_id, 'mail.mass_mailing.contact', 'mailing.contact'
|
||||
)
|
||||
WHERE unsubscriber_id LIKE 'mail.mass_mailing_contact%'
|
||||
""",
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user