From 22c9fbc14a6c32ca96979cc0e7b9d56266cef775 Mon Sep 17 00:00:00 2001 From: Guillaume Masson Date: Tue, 5 Jun 2018 14:21:44 +0200 Subject: [PATCH] [FIX] account_payment_order: column "payment_order_type" does not exist during migration to 9.0 (#471) --- account_payment_order/migrations/9.0.1.0.0/post-migration.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/account_payment_order/migrations/9.0.1.0.0/post-migration.py b/account_payment_order/migrations/9.0.1.0.0/post-migration.py index dba5b66d0..02ac34077 100644 --- a/account_payment_order/migrations/9.0.1.0.0/post-migration.py +++ b/account_payment_order/migrations/9.0.1.0.0/post-migration.py @@ -24,7 +24,10 @@ def map_payment_type(cr): @openupgrade.migrate(use_env=True) def migrate(env, version): cr = env.cr - map_payment_type(cr) + table = 'account_payment_order' + if (openupgrade.table_exists(cr, table) and + openupgrade.column_exists(cr, table, 'payment_order_type')): + map_payment_type(cr) cr.execute(""" UPDATE account_payment_order apo