[FIX] account_banking_mandate: Adapt migration script to v11

This commit is contained in:
Pedro M. Baeza
2019-06-17 10:13:14 +02:00
parent e9c90aba02
commit e4ca8aa296
2 changed files with 5 additions and 5 deletions

View File

@@ -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)]},
)

View File

@@ -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)