mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[OU-FIX] account_payment_partner: Pre-create payment_mode_id
So the compute method is not triggered (it will be filled later by post-migration script).
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# Copyright 2021 Tecnativa - Pedro M. Baeza
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openupgradelib import openupgrade # pylint: disable=W7936
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
# Pre-create column for avoiding to trigger the compute
|
||||
openupgrade.logged_query(
|
||||
env.cr, "ALTER TABLE account_move ADD payment_mode_id int4"
|
||||
)
|
||||
Reference in New Issue
Block a user