From 4488d217dcea8abc8b8baf3d1b10270566f247fa Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Tue, 4 Aug 2026 10:17:05 +0200 Subject: [PATCH 1/3] [IMP] allow statement download by OdooBot --- README.md | 4 ++-- account_ebics/__manifest__.py | 2 +- account_ebics/wizards/ebics_xfer.py | 11 +++++++---- account_ebics_batch/__manifest__.py | 2 +- account_ebics_batch/models/ebics_batch_log.py | 16 +++++++--------- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index a851d90..0608bb3 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ Available addons ---------------- addon | version | maintainers | summary --- | --- | --- | --- -[account_ebics](account_ebics/) | 18.0.1.2.0 | | EBICS banking protocol -[account_ebics_batch](account_ebics_batch/) | 18.0.1.0.0 | | EBICS Files automated import and processing +[account_ebics](account_ebics/) | 18.0.1.2.1 | | EBICS banking protocol +[account_ebics_batch](account_ebics_batch/) | 18.0.1.0.1 | | EBICS Files automated import and processing [account_ebics_batch_payment](account_ebics_batch_payment/) | 18.0.1.1.0 | | Upload Batch Payment via EBICS [account_ebics_oca_statement_import](account_ebics_oca_statement_import/) | 18.0.1.0.1 | | Use OCA Bank Statement Import with account_ebics [account_ebics_oe](account_ebics_oe/) | 18.0.1.0.0 | | Deploy account_ebics module on Odoo Enterprise diff --git a/account_ebics/__manifest__.py b/account_ebics/__manifest__.py index 561e5b6..7acb943 100644 --- a/account_ebics/__manifest__.py +++ b/account_ebics/__manifest__.py @@ -3,7 +3,7 @@ { "name": "EBICS banking protocol", - "version": "18.0.1.2.0", + "version": "18.0.1.2.1", "license": "LGPL-3", "author": "Noviat", "website": "https://www.noviat.com/", diff --git a/account_ebics/wizards/ebics_xfer.py b/account_ebics/wizards/ebics_xfer.py index 97c0d03..1e829f9 100644 --- a/account_ebics/wizards/ebics_xfer.py +++ b/account_ebics/wizards/ebics_xfer.py @@ -6,7 +6,7 @@ import logging from sys import exc_info from traceback import format_exception -from odoo import api, fields, models +from odoo import SUPERUSER_ID, api, fields, models from odoo.exceptions import UserError _logger = logging.getLogger(__name__) @@ -133,9 +133,12 @@ class EbicsXfer(models.TransientModel): @api.onchange("ebics_config_id") def _onchange_ebics_config_id(self): - avail_userids = self.ebics_config_id.ebics_userid_ids.filtered( - lambda r: self.env.user.id in r.user_ids.ids - ) + if self.env.uid == SUPERUSER_ID: + avail_userids = self.ebics_config_id.ebics_userid_ids + else: + avail_userids = self.ebics_config_id.ebics_userid_ids.filtered( + lambda r: self.env.user.id in r.user_ids.ids + ) if self.env.context.get("ebics_download"): # Download Form avail_formats = self.ebics_config_id.ebics_file_format_ids.filtered( diff --git a/account_ebics_batch/__manifest__.py b/account_ebics_batch/__manifest__.py index 550f79e..57826e0 100644 --- a/account_ebics_batch/__manifest__.py +++ b/account_ebics_batch/__manifest__.py @@ -3,7 +3,7 @@ { "name": "EBICS Files batch import", - "version": "18.0.1.0.0", + "version": "18.0.1.0.1", "license": "AGPL-3", "author": "Noviat", "website": "https://www.noviat.com/", diff --git a/account_ebics_batch/models/ebics_batch_log.py b/account_ebics_batch/models/ebics_batch_log.py index 93a2ed9..0ef8851 100644 --- a/account_ebics_batch/models/ebics_batch_log.py +++ b/account_ebics_batch/models/ebics_batch_log.py @@ -4,7 +4,7 @@ from sys import exc_info from traceback import format_exception -from odoo import api, fields, models +from odoo import SUPERUSER_ID, api, fields, models from odoo.exceptions import UserError @@ -78,14 +78,12 @@ class EbicsBatchLog(models.Model): """ log_model = self.env["ebics.batch.log"] import_dict = {"errors": []} - configs = self.env["ebics.config"].browse(ebics_config_ids) or self.env[ - "ebics.config" - ].search( - [ - ("company_ids", "in", self.env.user.company_ids.ids), - ("state", "=", "confirm"), - ] - ) + configs = self.env["ebics.config"].browse(ebics_config_ids) + if not configs: + domain = [("state", "=", "confirm")] + if self.env.uid != SUPERUSER_ID: + domain.insert(0, ("company_ids", "in", self.env.user.company_ids.ids)) + configs = self.env["ebics.config"].sudo().search(domain) log = log_model.create( { "ebics_config_ids": [(6, 0, configs.ids)], From 9fc63a2751ecbe7ef39203adae87d0065be5797c Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Tue, 4 Aug 2026 17:20:10 +0200 Subject: [PATCH 2/3] [IMP] account_ebics_batch_payment: pre-fill EBICS file format from payment method --- README.md | 2 +- account_ebics_batch_payment/__manifest__.py | 7 +++-- .../models/__init__.py | 2 +- .../models/account_batch_payment.py | 2 ++ .../models/account_payment_method.py | 26 ++++++++++++++++ .../views/account_journal_views.xml | 30 +++++++++++++++++++ 6 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 account_ebics_batch_payment/models/account_payment_method.py create mode 100644 account_ebics_batch_payment/views/account_journal_views.xml diff --git a/README.md b/README.md index 0608bb3..ad552f7 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ addon | version | maintainers | summary --- | --- | --- | --- [account_ebics](account_ebics/) | 18.0.1.2.1 | | EBICS banking protocol [account_ebics_batch](account_ebics_batch/) | 18.0.1.0.1 | | EBICS Files automated import and processing -[account_ebics_batch_payment](account_ebics_batch_payment/) | 18.0.1.1.0 | | Upload Batch Payment via EBICS +[account_ebics_batch_payment](account_ebics_batch_payment/) | 18.0.1.2.0 | | Upload Batch Payment via EBICS [account_ebics_oca_statement_import](account_ebics_oca_statement_import/) | 18.0.1.0.1 | | Use OCA Bank Statement Import with account_ebics [account_ebics_oe](account_ebics_oe/) | 18.0.1.0.0 | | Deploy account_ebics module on Odoo Enterprise [account_ebics_payment_order](account_ebics_payment_order/) | 18.0.1.2.0 | | Upload Payment Order via EBICS diff --git a/account_ebics_batch_payment/__manifest__.py b/account_ebics_batch_payment/__manifest__.py index 91d1b6e..d521467 100644 --- a/account_ebics_batch_payment/__manifest__.py +++ b/account_ebics_batch_payment/__manifest__.py @@ -3,13 +3,16 @@ { "name": "Upload Batch Payment via EBICS", - "version": "18.0.1.1.0", + "version": "18.0.1.2.0", "license": "LGPL-3", "author": "Noviat", "website": "https://www.noviat.com/", "category": "Accounting & Finance", "depends": ["account_ebics", "account_batch_payment"], - "data": ["views/account_batch_payment_views.xml"], + "data": [ + "views/account_journal_views.xml", + "views/account_batch_payment_views.xml", + ], "installable": True, "images": ["static/description/cover.png"], } diff --git a/account_ebics_batch_payment/models/__init__.py b/account_ebics_batch_payment/models/__init__.py index 015ee74..b9b458f 100644 --- a/account_ebics_batch_payment/models/__init__.py +++ b/account_ebics_batch_payment/models/__init__.py @@ -1 +1 @@ -from . import account_batch_payment +from . import account_batch_payment, account_payment_method diff --git a/account_ebics_batch_payment/models/account_batch_payment.py b/account_ebics_batch_payment/models/account_batch_payment.py index 2b22db7..a3c6904 100644 --- a/account_ebics_batch_payment/models/account_batch_payment.py +++ b/account_ebics_batch_payment/models/account_batch_payment.py @@ -49,6 +49,8 @@ class AccountBatchPayment(models.Model): ) ebics_xfer._onchange_ebics_config_id() ebics_xfer._onchange_upload_data() + if not ebics_xfer.format_id and self.payment_method_id.ebics_file_format_id: + ebics_xfer.format_id = self.payment_method_id.ebics_file_format_id view = self.env.ref("account_ebics.ebics_xfer_view_form_upload") act = { "name": self.env._("EBICS Upload"), diff --git a/account_ebics_batch_payment/models/account_payment_method.py b/account_ebics_batch_payment/models/account_payment_method.py new file mode 100644 index 0000000..bc08356 --- /dev/null +++ b/account_ebics_batch_payment/models/account_payment_method.py @@ -0,0 +1,26 @@ +# Copyright 2025 Noviat. +# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class AccountPaymentMethod(models.Model): + _inherit = "account.payment.method" + + ebics_file_format_id = fields.Many2one( + comodel_name="ebics.file.format", + string="EBICS File Format", + help="EBICS file format to pre-select when uploading a batch payment " + "that uses this payment method.", + ) + + +class AccountPaymentMethodLine(models.Model): + _inherit = "account.payment.method.line" + + ebics_file_format_id = fields.Many2one( + comodel_name="ebics.file.format", + related="payment_method_id.ebics_file_format_id", + readonly=False, + string="EBICS File Format", + ) diff --git a/account_ebics_batch_payment/views/account_journal_views.xml b/account_ebics_batch_payment/views/account_journal_views.xml new file mode 100644 index 0000000..771b8bb --- /dev/null +++ b/account_ebics_batch_payment/views/account_journal_views.xml @@ -0,0 +1,30 @@ + + + + account.journal.form.ebics.payment.method + account.journal + + + + + + + + + + + From e968eb737f4d247dfe242bd14fb8ef0902adcb04 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Tue, 4 Aug 2026 16:23:49 +0000 Subject: [PATCH 3/3] [UPD] Update account_ebics_batch_payment.pot --- .../i18n/account_ebics_batch_payment.pot | 20 ++++++++++++++++ account_ebics_batch_payment/i18n/fr.po | 20 ++++++++++++++++ account_ebics_batch_payment/i18n/nl.po | 23 ++++++++++++++++++- 3 files changed, 62 insertions(+), 1 deletion(-) 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 06fc2ab..08a5e05 100644 --- a/account_ebics_batch_payment/i18n/account_ebics_batch_payment.pot +++ b/account_ebics_batch_payment/i18n/account_ebics_batch_payment.pot @@ -20,6 +20,12 @@ msgstr "" msgid "Batch Payment" msgstr "" +#. module: account_ebics_batch_payment +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method__ebics_file_format_id +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method_line__ebics_file_format_id +msgid "EBICS File Format" +msgstr "" + #. module: account_ebics_batch_payment #. odoo-python #: code:addons/account_ebics_batch_payment/models/account_batch_payment.py:0 @@ -27,6 +33,14 @@ msgstr "" msgid "EBICS Upload" msgstr "" +#. module: account_ebics_batch_payment +#: model:ir.model.fields,help:account_ebics_batch_payment.field_account_payment_method__ebics_file_format_id +#: model:ir.model.fields,help:account_ebics_batch_payment.field_account_payment_method_line__ebics_file_format_id +msgid "" +"EBICS file format to pre-select when uploading a batch payment that uses " +"this payment method." +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" @@ -37,3 +51,9 @@ msgstr "" #: code:addons/account_ebics_batch_payment/models/account_batch_payment.py:0 msgid "No active EBICS configuration available for the selected bank." msgstr "" + +#. module: account_ebics_batch_payment +#: model:ir.model,name:account_ebics_batch_payment.model_account_payment_method +#: model:ir.model,name:account_ebics_batch_payment.model_account_payment_method_line +msgid "Payment Methods" +msgstr "" diff --git a/account_ebics_batch_payment/i18n/fr.po b/account_ebics_batch_payment/i18n/fr.po index 5421282..d1d8204 100644 --- a/account_ebics_batch_payment/i18n/fr.po +++ b/account_ebics_batch_payment/i18n/fr.po @@ -27,6 +27,12 @@ msgstr "" msgid "Batch Payment" msgstr "Paiement par lot" +#. module: account_ebics_batch_payment +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method__ebics_file_format_id +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method_line__ebics_file_format_id +msgid "EBICS File Format" +msgstr "" + #. module: account_ebics_batch_payment #. odoo-python #: code:addons/account_ebics_batch_payment/models/account_batch_payment.py:0 @@ -34,6 +40,14 @@ msgstr "Paiement par lot" msgid "EBICS Upload" msgstr "Téléversement EBICS" +#. module: account_ebics_batch_payment +#: model:ir.model.fields,help:account_ebics_batch_payment.field_account_payment_method__ebics_file_format_id +#: model:ir.model.fields,help:account_ebics_batch_payment.field_account_payment_method_line__ebics_file_format_id +msgid "" +"EBICS file format to pre-select when uploading a batch payment that uses " +"this payment method." +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" @@ -45,3 +59,9 @@ msgstr "Masquer le téléversement Ebics" msgid "No active EBICS configuration available for the selected bank." msgstr "" "Aucune configuration EBICS active disponible pour la banque sélectionnée." + +#. module: account_ebics_batch_payment +#: model:ir.model,name:account_ebics_batch_payment.model_account_payment_method +#: model:ir.model,name:account_ebics_batch_payment.model_account_payment_method_line +msgid "Payment Methods" +msgstr "" diff --git a/account_ebics_batch_payment/i18n/nl.po b/account_ebics_batch_payment/i18n/nl.po index c710376..c388da0 100644 --- a/account_ebics_batch_payment/i18n/nl.po +++ b/account_ebics_batch_payment/i18n/nl.po @@ -27,6 +27,12 @@ msgstr "" msgid "Batch Payment" msgstr "Batchbetaling" +#. module: account_ebics_batch_payment +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method__ebics_file_format_id +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method_line__ebics_file_format_id +msgid "EBICS File Format" +msgstr "" + #. module: account_ebics_batch_payment #. odoo-python #: code:addons/account_ebics_batch_payment/models/account_batch_payment.py:0 @@ -34,6 +40,14 @@ msgstr "Batchbetaling" msgid "EBICS Upload" msgstr "EBICS-upload" +#. module: account_ebics_batch_payment +#: model:ir.model.fields,help:account_ebics_batch_payment.field_account_payment_method__ebics_file_format_id +#: model:ir.model.fields,help:account_ebics_batch_payment.field_account_payment_method_line__ebics_file_format_id +msgid "" +"EBICS file format to pre-select when uploading a batch payment that uses " +"this payment method." +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" @@ -43,4 +57,11 @@ msgstr "Ebics-upload verbergen" #. odoo-python #: code:addons/account_ebics_batch_payment/models/account_batch_payment.py:0 msgid "No active EBICS configuration available for the selected bank." -msgstr "Geen actieve EBICS-configuratie beschikbaar voor de geselecteerde bank." +msgstr "" +"Geen actieve EBICS-configuratie beschikbaar voor de geselecteerde bank." + +#. module: account_ebics_batch_payment +#: model:ir.model,name:account_ebics_batch_payment.model_account_payment_method +#: model:ir.model,name:account_ebics_batch_payment.model_account_payment_method_line +msgid "Payment Methods" +msgstr ""