l10n-switzerland-flectra/l10n_ch_pain_base/migrations/11.0.1.0.0/post-migration.py
2021-07-21 13:01:38 +02:00

17 lines
454 B
Python

# Copyright 2018 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
def reference_type_bvr_to_isr(cr):
"""Change BVR to ISR in reference_type field"""
cr.execute("""
UPDATE account_payment_line SET communication_type='isr'
WHERE communication_type = 'bvr';
""")
@openupgrade.migrate()
def migrate(env, version):
reference_type_bvr_to_isr(env.cr)