diff --git a/account_ebics_batch_payment/i18n/account_ebics_batch_payment.pot b/account_ebics_batch_payment/i18n/account_ebics_batch_payment.pot index 01c93e1..4778a68 100644 --- a/account_ebics_batch_payment/i18n/account_ebics_batch_payment.pot +++ b/account_ebics_batch_payment/i18n/account_ebics_batch_payment.pot @@ -22,6 +22,7 @@ msgstr "" #. module: account_ebics_batch_payment #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_batch_payment__display_name +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_journal__display_name #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method__display_name #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method_line__display_name msgid "Display Name" @@ -48,6 +49,11 @@ msgid "" "this payment method." msgstr "" +#. module: account_ebics_batch_payment +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_journal__ebics_file_format_ids +msgid "Ebics File Format" +msgstr "" + #. module: account_ebics_batch_payment #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_batch_payment__hide_ebics_upload msgid "Hide Ebics Upload" @@ -55,11 +61,17 @@ msgstr "" #. module: account_ebics_batch_payment #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_batch_payment__id +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_journal__id #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method__id #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method_line__id msgid "ID" msgstr "" +#. module: account_ebics_batch_payment +#: model:ir.model,name:account_ebics_batch_payment.model_account_journal +msgid "Journal" +msgstr "" + #. module: account_ebics_batch_payment #. odoo-python #: code:addons/account_ebics_batch_payment/models/account_batch_payment.py:0 diff --git a/account_ebics_batch_payment/i18n/fr.po b/account_ebics_batch_payment/i18n/fr.po index a953abf..2ba258c 100644 --- a/account_ebics_batch_payment/i18n/fr.po +++ b/account_ebics_batch_payment/i18n/fr.po @@ -29,6 +29,7 @@ msgstr "Paiement par lot" #. module: account_ebics_batch_payment #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_batch_payment__display_name +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_journal__display_name #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method__display_name #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method_line__display_name msgid "Display Name" @@ -55,6 +56,11 @@ msgid "" "this payment method." msgstr "" +#. module: account_ebics_batch_payment +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_journal__ebics_file_format_ids +msgid "Ebics File Format" +msgstr "" + #. module: account_ebics_batch_payment #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_batch_payment__hide_ebics_upload msgid "Hide Ebics Upload" @@ -62,11 +68,17 @@ msgstr "Masquer le téléversement Ebics" #. module: account_ebics_batch_payment #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_batch_payment__id +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_journal__id #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method__id #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method_line__id msgid "ID" msgstr "Identifiant" +#. module: account_ebics_batch_payment +#: model:ir.model,name:account_ebics_batch_payment.model_account_journal +msgid "Journal" +msgstr "" + #. module: account_ebics_batch_payment #. odoo-python #: code:addons/account_ebics_batch_payment/models/account_batch_payment.py:0 diff --git a/account_ebics_batch_payment/i18n/nl.po b/account_ebics_batch_payment/i18n/nl.po index 2cec603..ecd2136 100644 --- a/account_ebics_batch_payment/i18n/nl.po +++ b/account_ebics_batch_payment/i18n/nl.po @@ -29,6 +29,7 @@ msgstr "Batchbetaling" #. module: account_ebics_batch_payment #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_batch_payment__display_name +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_journal__display_name #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method__display_name #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method_line__display_name msgid "Display Name" @@ -55,6 +56,11 @@ msgid "" "this payment method." msgstr "" +#. module: account_ebics_batch_payment +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_journal__ebics_file_format_ids +msgid "Ebics File Format" +msgstr "" + #. module: account_ebics_batch_payment #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_batch_payment__hide_ebics_upload msgid "Hide Ebics Upload" @@ -62,11 +68,17 @@ msgstr "Ebics-upload verbergen" #. module: account_ebics_batch_payment #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_batch_payment__id +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_journal__id #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method__id #: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method_line__id msgid "ID" msgstr "ID" +#. module: account_ebics_batch_payment +#: model:ir.model,name:account_ebics_batch_payment.model_account_journal +msgid "Journal" +msgstr "" + #. module: account_ebics_batch_payment #. odoo-python #: code:addons/account_ebics_batch_payment/models/account_batch_payment.py:0 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..dfddd2e --- /dev/null +++ b/account_ebics_batch_payment/models/account_journal.py @@ -0,0 +1,19 @@ +# Copyright 2026 Noviat. +# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl). + +from odoo import api, fields, models + + +class AccountJournal(models.Model): + _inherit = "account.journal" + + ebics_file_format_ids = fields.Many2many( + comodel_name="ebics.file.format", + compute="_compute_ebics_file_format_ids", + ) + + @api.depends("ebics_config_ids.ebics_file_format_ids", "ebics_config_ids.state") + def _compute_ebics_file_format_ids(self): + for rec in self: + config = rec.ebics_config_ids.filtered(lambda r: r.state == "confirm")[:1] + rec.ebics_file_format_ids = config.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')]" />