[FIX] account_payment_mode: Pre-create column on migration

This commit is contained in:
Pedro M. Baeza
2017-09-25 11:00:46 +02:00
committed by GitHub
parent d6660fb624
commit 7d32b9db38

View File

@@ -22,6 +22,9 @@ def migrate_from_8(cr):
cr.execute('ALTER SEQUENCE payment_mode_id_seq '
'RENAME TO account_payment_mode_id_seq')
# Set fixed bank account in all, which is the equivalent behavior in v8
cr.execute(
"ALTER TABLE account_payment_mode ADD bank_account_link VARCHAR"
)
cr.execute("UPDATE account_payment_mode SET bank_account_link='fixed'")
cr.execute(
'ALTER TABLE account_payment_mode '