mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] account_banking_mandate: Adapt migration script to v11
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2019 Tecnativa - Pedro M. Baeza
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
@@ -13,3 +12,4 @@ def migrate(env, version):
|
||||
openupgrade_90.convert_binary_field_to_attachment(
|
||||
env, {'account.banking.mandate': [('scan', None)]},
|
||||
)
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2019 Tecnativa - Pedro M. Baeza
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
@@ -12,6 +11,7 @@ column_renames = {
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(cr, version):
|
||||
if openupgrade.column_exists(cr, 'account_banking_mandate', 'scan'):
|
||||
openupgrade.rename_columns(cr, column_renames)
|
||||
def migrate(env, version):
|
||||
if openupgrade.column_exists(env.cr, 'account_banking_mandate', 'scan'):
|
||||
openupgrade.rename_columns(env.cr, column_renames)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user