From db62b6bb02990ab25686ca606334f2a84bdbfc23 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sat, 16 Mar 2024 18:17:56 +0100 Subject: [PATCH] [OU-FIX] account_reconcile_oca: Avoid crash when coming from v15 When coming directly from v15, the field `reconcile_data`` doesn't exist, so the migration scripts here will crash. The solution is to check if the column exists and exit early if not. --- account_reconcile_oca/migrations/16.0.1.2.0/pre-migration.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/account_reconcile_oca/migrations/16.0.1.2.0/pre-migration.py b/account_reconcile_oca/migrations/16.0.1.2.0/pre-migration.py index 4150d2ac..e1cda49d 100644 --- a/account_reconcile_oca/migrations/16.0.1.2.0/pre-migration.py +++ b/account_reconcile_oca/migrations/16.0.1.2.0/pre-migration.py @@ -3,6 +3,10 @@ from openupgradelib import openupgrade @openupgrade.migrate() def migrate(env, version): + if not openupgrade.column_exists( + env.cr, "account_bank_statement_line", "reconcile_data" + ): + return # coming directly from v15, so reconcile_data doesn't exist # Due to the big change we did, we need to loose how data is stored openupgrade.logged_query( env.cr,