mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[9.0][MIG] account_payment_mode: Migration script for force recompute account bank types
This commit is contained in:
15
account_payment_mode/migrations/9.0.1.0.0/post-migration.py
Normal file
15
account_payment_mode/migrations/9.0.1.0.0/post-migration.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2017 Sergio Teruel <sergio.teruel@tecnativa.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openupgradelib import openupgrade
|
||||
|
||||
|
||||
@openupgrade.migrate(use_env=True)
|
||||
def migrate(env, version):
|
||||
if not version:
|
||||
return
|
||||
# Force recompute acc_type, issue with inheritance chain between base
|
||||
# module and base_iban with this module
|
||||
if openupgrade.is_module_installed(env.cr, 'base_iban'):
|
||||
env['res.partner.bank'].search([])._compute_acc_type()
|
||||
Reference in New Issue
Block a user