oca-technical/odoo-bringout-oca-account-closing-account_cutoff_base/account_cutoff_base/migrations/16.0.1.0.0/pre-migration.py
2025-08-29 15:43:03 +02:00

21 lines
621 B
Python

# Copyright 2023 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
if not openupgrade.column_exists(env.cr, "account_cutoff", "move_ref"):
openupgrade.rename_fields(
env,
[
(
"account.cutoff",
"account_cutoff",
"move_label",
"move_ref",
),
],
)