mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[OU] account_payment_partner: Migration scripts
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# Copyright 2020 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):
|
||||
openupgrade.logged_query(
|
||||
env.cr,
|
||||
"""
|
||||
UPDATE account_move am
|
||||
SET payment_mode_id = ai.payment_mode_id
|
||||
FROM account_invoice ai
|
||||
WHERE ai.id = am.old_invoice_id""",
|
||||
)
|
||||
Reference in New Issue
Block a user