Files
bank-payment/account_banking_sepa_credit_transfer/post_install.py
Pedro M. Baeza f51b565a2b [MIG] account_banking_pain_base: Migration to 12.0
* Standard migration procedure
* README by fragments
* Fixed tests
* Change
* Fix related no readonly in account_banking_pain_base
* Override default partner bank account check on account_payment_partner
* Convert Python date to string
2018-12-14 11:30:24 +01:00

19 lines
627 B
Python

# Copyright 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, SUPERUSER_ID
def update_bank_journals(cr, registry):
with api.Environment.manage():
env = api.Environment(cr, SUPERUSER_ID, {})
ajo = env['account.journal']
journals = ajo.search([('type', '=', 'bank')])
sct = env.ref(
'account_banking_sepa_credit_transfer.sepa_credit_transfer')
if sct:
journals.write({
'outbound_payment_method_ids': [(4, sct.id)],
})
return