diff --git a/README.md b/README.md index a338a4d..073dcd0 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ Available addons ---------------- addon | version | maintainers | summary --- | --- | --- | --- -[account_ebics](account_ebics/) | 19.0.1.1.0 | | EBICS banking protocol -[account_ebics_batch](account_ebics_batch/) | 19.0.1.0.0 | | EBICS Files automated import and processing -[account_ebics_batch_payment](account_ebics_batch_payment/) | 19.0.1.1.0 | | Upload Batch Payment via EBICS +[account_ebics](account_ebics/) | 19.0.1.1.1 | | EBICS banking protocol +[account_ebics_batch](account_ebics_batch/) | 19.0.1.0.1 | | EBICS Files automated import and processing +[account_ebics_batch_payment](account_ebics_batch_payment/) | 19.0.1.2.0 | | Upload Batch Payment via EBICS [account_ebics_oe](account_ebics_oe/) | 19.0.1.0.0 | | Deploy account_ebics module on Odoo Enterprise [account_ebics_payment_order](account_ebics_payment_order/) | 19.0.1.0.0 | | Upload Payment Order via EBICS diff --git a/account_ebics/__manifest__.py b/account_ebics/__manifest__.py index 3d55076..2f2f521 100644 --- a/account_ebics/__manifest__.py +++ b/account_ebics/__manifest__.py @@ -3,7 +3,7 @@ { "name": "EBICS banking protocol", - "version": "19.0.1.1.0", + "version": "19.0.1.1.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 5847486..a284409 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 ced392c..50cbdd9 100644 --- a/account_ebics_batch/__manifest__.py +++ b/account_ebics_batch/__manifest__.py @@ -3,7 +3,7 @@ { "name": "EBICS Files batch import", - "version": "19.0.1.0.0", + "version": "19.0.1.0.1", "license": "LGPL-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 dbb6931..cf0ed89 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 @@ -77,14 +77,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)], diff --git a/account_ebics_batch_payment/__manifest__.py b/account_ebics_batch_payment/__manifest__.py index 1aaf0d6..475b4d1 100644 --- a/account_ebics_batch_payment/__manifest__.py +++ b/account_ebics_batch_payment/__manifest__.py @@ -3,12 +3,15 @@ { "name": "Upload Batch Payment via EBICS", - "version": "19.0.1.1.0", + "version": "19.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", + ], "images": ["static/description/cover.png"], } 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 9f37a16..01c93e1 100644 --- a/account_ebics_batch_payment/i18n/account_ebics_batch_payment.pot +++ b/account_ebics_batch_payment/i18n/account_ebics_batch_payment.pot @@ -22,9 +22,17 @@ 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_payment_method__display_name +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method_line__display_name msgid "Display Name" 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 @@ -32,6 +40,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" @@ -39,6 +55,8 @@ 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_payment_method__id +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method_line__id msgid "ID" msgstr "" @@ -47,3 +65,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 dd5ffe5..a953abf 100644 --- a/account_ebics_batch_payment/i18n/fr.po +++ b/account_ebics_batch_payment/i18n/fr.po @@ -9,8 +9,10 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-08-31 23:02+0000\n" "PO-Revision-Date: 2026-06-04 12:17+0000\n" -"Last-Translator: Weblate Translation Memory \n" -"Language-Team: French \n" +"Last-Translator: Weblate Translation Memory \n" +"Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -27,9 +29,17 @@ 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_payment_method__display_name +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method_line__display_name msgid "Display Name" msgstr "Nom affiché" +#. 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 @@ -37,6 +47,14 @@ msgstr "Nom affiché" 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" @@ -44,6 +62,8 @@ 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_payment_method__id +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method_line__id msgid "ID" msgstr "Identifiant" @@ -53,3 +73,9 @@ msgstr "Identifiant" 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 0f71376..2cec603 100644 --- a/account_ebics_batch_payment/i18n/nl.po +++ b/account_ebics_batch_payment/i18n/nl.po @@ -9,8 +9,10 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-08-31 23:13+0000\n" "PO-Revision-Date: 2026-06-04 12:17+0000\n" -"Last-Translator: Weblate Translation Memory \n" -"Language-Team: Dutch \n" +"Last-Translator: Weblate Translation Memory \n" +"Language-Team: Dutch \n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -27,9 +29,17 @@ 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_payment_method__display_name +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method_line__display_name msgid "Display Name" msgstr "Weergavenaam" +#. 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 @@ -37,6 +47,14 @@ msgstr "Weergavenaam" 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" @@ -44,6 +62,8 @@ 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_payment_method__id +#: model:ir.model.fields,field_description:account_ebics_batch_payment.field_account_payment_method_line__id msgid "ID" msgstr "ID" @@ -53,3 +73,9 @@ msgstr "ID" msgid "No active EBICS configuration available for the selected 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 "" 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 07bb8a1..f6eecf9 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..a3951c2 --- /dev/null +++ b/account_ebics_batch_payment/views/account_journal_views.xml @@ -0,0 +1,30 @@ + + + + account.journal.form.ebics.payment.method + account.journal + + + + + + + + + + +