bank-payment/account_banking_mandate/migrations/11.0.2.0.0/pre-migration.py

17 lines
427 B
Python
Raw Permalink Normal View History

2021-03-23 19:28:51 +00:00
# Copyright 2019 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
column_renames = {
'account_banking_mandate': [
('scan', None),
],
}
@openupgrade.migrate()
def migrate(env, version):
if openupgrade.column_exists(env.cr, 'account_banking_mandate', 'scan'):
openupgrade.rename_columns(env.cr, column_renames)