mirror of https://github.com/OCA/social.git
Merge pull request #1118 from Tecnativa/15.0-fix-old-sintaxis-jinja2-for-jinja3
[15.0][IMP] mail_notification_custom_subject: add migration script for convert syntaxis of jinja2 to jinja3pull/1140/head
commit
a30cd5b14f
|
@ -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,
|
||||
'${',
|
||||
'{{'),
|
||||
'}',
|
||||
'}}'
|
||||
)
|
||||
"""
|
||||
)
|
Loading…
Reference in New Issue