diff --git a/account_ebics_batch_payment/models/__init__.py b/account_ebics_batch_payment/models/__init__.py index b9b458f..697c293 100644 --- a/account_ebics_batch_payment/models/__init__.py +++ b/account_ebics_batch_payment/models/__init__.py @@ -1 +1 @@ -from . import account_batch_payment, account_payment_method +from . import account_batch_payment, account_journal, account_payment_method diff --git a/account_ebics_batch_payment/models/account_journal.py b/account_ebics_batch_payment/models/account_journal.py new file mode 100644 index 0000000..8106a46 --- /dev/null +++ b/account_ebics_batch_payment/models/account_journal.py @@ -0,0 +1,13 @@ +# Copyright 2026 Noviat. +# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class AccountJournal(models.Model): + _inherit = "account.journal" + + ebics_file_format_ids = fields.Many2many( + comodel_name="ebics.file.format", + related="ebics_config_id.ebics_file_format_ids", + ) diff --git a/account_ebics_batch_payment/views/account_journal_views.xml b/account_ebics_batch_payment/views/account_journal_views.xml index a3951c2..d6cbf2c 100644 --- a/account_ebics_batch_payment/views/account_journal_views.xml +++ b/account_ebics_batch_payment/views/account_journal_views.xml @@ -13,6 +13,7 @@ name="ebics_file_format_id" optional="hide" options="{'no_create': True}" + domain="[('id', 'in', parent.ebics_file_format_ids), ('type', '=', 'up')]" />