mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
Port almost all modules to v10 * Update to EPC Rulebook v9.2 that start to apply on 2016-11-20 (bug #300)
20 lines
636 B
Python
20 lines
636 B
Python
# -*- coding: utf-8 -*-
|
|
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
|
# License AGPL-3.0 or later (http://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')])
|
|
sdd = env.ref(
|
|
'account_banking_sepa_direct_debit.sepa_direct_debit')
|
|
if sdd:
|
|
journals.write({
|
|
'inbound_payment_method_ids': [(4, sdd.id)],
|
|
})
|
|
return
|