mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
As the changes for having online raw data have been made only on v12 and v14, people coming from v13 won't have this column populated on the DB, so we need to be tolerant with that circumstance.
20 lines
542 B
Python
20 lines
542 B
Python
# Copyright 2022 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
|
|
|
|
_column_renames = {
|
|
"account_bank_statement_line": [
|
|
("online_raw_data", None),
|
|
]
|
|
}
|
|
|
|
|
|
@openupgrade.migrate()
|
|
def migrate(env, version):
|
|
if openupgrade.column_exists(
|
|
env.cr, "account_bank_statement_line", "online_raw_data"
|
|
):
|
|
openupgrade.rename_columns(env.cr, _column_renames)
|