[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.pull/641/head
parent
427bd8a04f
commit
db62b6bb02
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue