Merge pull request #413 from Tecnativa/9.0-MIG-account_payment_mode

[9.0][MIG] account_payment_mode: Migration script for force recompute account bank types
This commit is contained in:
Pedro M. Baeza
2017-11-10 11:35:14 +01:00
committed by GitHub

View 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()