From 1246590592653eff9d440b671d4da2afe98aee23 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Wed, 5 Aug 2026 10:10:48 +0200 Subject: [PATCH 1/3] [IMP] account_ebics_batch_payment: restrict EBICS file format domain to upload formats defined in EBICS config --- account_ebics_batch_payment/models/__init__.py | 2 +- .../models/account_journal.py | 13 +++++++++++++ .../views/account_journal_views.xml | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 account_ebics_batch_payment/models/account_journal.py 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')]" /> From 14485aa722ef3aa471ddaf765d3e26b11855c71b Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Wed, 5 Aug 2026 12:45:53 +0200 Subject: [PATCH 2/3] [IMP] account_ebics_batch_payment: resolve non-searchable field warning Replace `related="ebics_config_id.ebics_file_format_ids"` with an explicit compute method depending on the stored `ebics_config_ids` Many2many, avoiding a dependency chain through the non-searchable computed field `ebics_config_id`. --- account_ebics_batch_payment/models/account_journal.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/account_ebics_batch_payment/models/account_journal.py b/account_ebics_batch_payment/models/account_journal.py index 8106a46..dfddd2e 100644 --- a/account_ebics_batch_payment/models/account_journal.py +++ b/account_ebics_batch_payment/models/account_journal.py @@ -1,7 +1,7 @@ # Copyright 2026 Noviat. # License LGPL-3 or later (http://www.gnu.org/licenses/lgpl). -from odoo import fields, models +from odoo import api, fields, models class AccountJournal(models.Model): @@ -9,5 +9,11 @@ class AccountJournal(models.Model): ebics_file_format_ids = fields.Many2many( comodel_name="ebics.file.format", - related="ebics_config_id.ebics_file_format_ids", + 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 From 7e70f52a33ffdb99594e4f8814414bf541198d7d Mon Sep 17 00:00:00 2001 From: oca-ci Date: Wed, 5 Aug 2026 10:54:19 +0000 Subject: [PATCH 3/3] [UPD] Update account_ebics_batch_payment.pot --- .../i18n/account_ebics_batch_payment.pot | 12 ++++++++++++ account_ebics_batch_payment/i18n/fr.po | 12 ++++++++++++ account_ebics_batch_payment/i18n/nl.po | 12 ++++++++++++ 3 files changed, 36 insertions(+) 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