[IMP] mail_notification_custom_subject: add migration script for convert syntaxis of jinja2 to jinja3

pull/1118/head
Luis Ernesto García Medina 2023-03-30 23:44:29 -06:00
parent df2bbfe107
commit 28b9228953
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# pylint: disable=C7902
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
env.cr.execute(
"""
UPDATE mail_message_custom_subject
SET subject_template=REPLACE(
REPLACE(
subject_template,
'${',
'{{'),
'}',
'}}'
)
"""
)