diff --git a/README.md b/README.md index 736d211..5cb70c4 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Available addons ---------------- addon | version | maintainers | summary --- | --- | --- | --- -[account_ebics](account_ebics/) | 20.0.1.0.0 | | Download bank statements and upload payment files directly from Odoo, using the European EBICS standard +[account_ebics](account_ebics/) | 20.0.1.1.0 | | Download bank statements and upload payment files directly from Odoo, using the European EBICS standard [account_ebics_oe](account_ebics_oe/) | 20.0.1.0.0 | | Place the EBICS menus in the Odoo Enterprise accounting application [//]: # (end addons) diff --git a/account_ebics/README.rst b/account_ebics/README.rst index 39423ae..e169c85 100644 --- a/account_ebics/README.rst +++ b/account_ebics/README.rst @@ -128,8 +128,6 @@ From this repository: - **EBICS - Odoo Enterprise Integration** (``account_ebics_oe``): required on Odoo Enterprise; installed automatically. -- **EBICS - Scheduled File Import** (``account_ebics_batch``): downloads and processes the - files of every connection on a schedule. - **EBICS - Batch Payments (Odoo Enterprise)** (``account_ebics_batch_payment``): uploads the batch payments of the Odoo Enterprise ``account_batch_payment`` module. - **EBICS - Payment Orders (OCA)** (``account_ebics_payment_order``): uploads the payment @@ -168,6 +166,18 @@ project is the bank, and it is almost never for a technical reason: Count in weeks per bank rather than days, and start the contract and the paperwork early. +Installation +============ + +**Upgrading from versions prior to account_ebics 20.0.1.1.0**: +If ``account_ebics_batch`` is present in your addons path, remove its directory +before running the upgrade. Its functionality has been merged into this module. + +If the directory is left on disk, the upgrade completes correctly but Odoo will +rediscover ``account_ebics_batch`` on the next restart and add it back to the +module list as *Not Installed*. It will not cause errors, but removing it keeps +the installation clean. + Configuration ============= @@ -193,6 +203,23 @@ connection per bank contract, with the identifiers your bank sent you. :alt: A downloaded camt.053 statement file in Odoo, before processing :width: 100% +Scheduled import +---------------- + +A scheduled action **EBICS Batch Import** is created **inactive** at installation, with a +daily interval. Activate it in *Settings > Technical > Automation > Scheduled Actions* +(developer mode), and adapt its interval if needed. + +The action runs the following method on all confirmed connections:: + + model._batch_import() + +To limit it to specific connections, pass their ids:: + + model._batch_import(ebics_config_ids=[1, 3]) + +Batch Import Logs are listed under *EBICS Processing > Batch Import Logs*. + Usage ===== @@ -203,6 +230,10 @@ Downloaded files are processed into bank statements. Uploads are launched from t batch or the payment order, with the format set in the configuration: on the payment mode for a payment order, on the journal's payment method for a batch payment. +Every run of the automatic download via the **EBICS Batch Import** scheduled action +creates a **Batch Import Log** that records which files were processed and what went wrong; +the *Reprocess* button retries any files still in draft until all errors are cleared. + .. image:: https://raw.githubusercontent.com/Noviat/account_ebics/19.0/account_ebics/static/description/ebics_upload.png :alt: Uploading a pain.001 SEPA credit transfer file over EBICS 3.0, with the test mode option :width: 100% @@ -226,16 +257,18 @@ During an upload or a download, your bank may return an error code, for example: The codes are explained on `ebics.org `_ and in the ``doc`` folder of this module (``EBICS_Annex1_ReturnCodes``). -Electronic Distributed Signature (EDS) --------------------------------------- +EBICS TS (Transport and Signature) and EBICS EDS (Electronic Distributed Signature) +----------------------------------------------------------------------------------- -Where your bank supports EBICS T, Odoo prepares the file and holds no signing credentials -at all: the payment is approved in your own signing application, which is what a segregation -of duties policy usually demands. Where it does not, which happens with German and Swiss -banks, the signing key sits on your Odoo server, and you can protect it with a separate -signature passphrase that is never stored and is asked for every signed transaction. +When configuring the bank connection as EBICS T, Odoo prepares the file and holds no signing +credentials at all: the payment is approved in your own signing application, which is what +a segregation of duties policy usually demands. +If you prefer not to do this or when the bank's web/mobile banking app does not support +unsigned payment files, you can upload signed files. +In this case, the signing key sits on your Odoo server, and you can protect it with +a separate signature passphrase that is never stored and is asked for every signed transaction. -External signing apps include BankingVEU +You can also explore the use of external signing apps such as BankingVEU (`Android `_, `iOS `_). @@ -250,6 +283,16 @@ Roadmap Issues and pull requests are welcome on `GitHub `_. +Changelog +========= + +20.0.1.1.0 (2026-11-17) +------------------------ + +The automated download of EBICS files (bank statements, payment status reports) was up to +Odoo 19.0 provided by the ``account_ebics_batch`` module. +This functionality has now been integrated into the base ``account_ebics`` module. + Credits ======= diff --git a/account_ebics/__manifest__.py b/account_ebics/__manifest__.py index 6547882..2e9b1cc 100644 --- a/account_ebics/__manifest__.py +++ b/account_ebics/__manifest__.py @@ -5,7 +5,7 @@ "name": "EBICS Banking Protocol", "summary": "Download bank statements and upload payment " "files directly from Odoo, using the European EBICS standard", - "version": "20.0.1.0.0", + "version": "20.0.1.1.0", "license": "LGPL-3", "author": "Noviat", "website": "https://www.noviat.com/", @@ -15,10 +15,12 @@ "security/ebics_security.xml", "security/ir.access.csv", "data/ebics_file_format.xml", + "data/ir_cron_data.xml", "views/ebics_config_views.xml", "views/ebics_file_views.xml", "views/ebics_userid_views.xml", "views/ebics_file_format_views.xml", + "views/ebics_batch_log_views.xml", "wizards/ebics_change_passphrase.xml", "wizards/ebics_xfer.xml", "wizards/ebics_admin_order.xml", diff --git a/account_ebics/data/ir_cron_data.xml b/account_ebics/data/ir_cron_data.xml new file mode 100644 index 0000000..07bfaaa --- /dev/null +++ b/account_ebics/data/ir_cron_data.xml @@ -0,0 +1,13 @@ + + + + EBICS Batch Import + + code + model._batch_import() + + + days + + + diff --git a/account_ebics/i18n/account_ebics.pot b/account_ebics/i18n/account_ebics.pot index bfbaf52..4b1f4e0 100644 --- a/account_ebics/i18n/account_ebics.pot +++ b/account_ebics/i18n/account_ebics.pot @@ -198,8 +198,6 @@ msgid "" "\n" "- **EBICS - Odoo Enterprise Integration** (``account_ebics_oe``): required on Odoo\n" " Enterprise; installed automatically.\n" -"- **EBICS - Scheduled File Import** (``account_ebics_batch``): downloads and processes the\n" -" files of every connection on a schedule.\n" "- **EBICS - Batch Payments (Odoo Enterprise)** (``account_ebics_batch_payment``): uploads\n" " the batch payments of the Odoo Enterprise ``account_batch_payment`` module.\n" "- **EBICS - Payment Orders (OCA)** (``account_ebics_payment_order``): uploads the payment\n" @@ -238,6 +236,18 @@ msgid "" "\n" "Count in weeks per bank rather than days, and start the contract and the paperwork early.\n" "\n" +"Installation\n" +"============\n" +"\n" +"**Upgrading from versions prior to account_ebics 20.0.1.1.0**:\n" +"If ``account_ebics_batch`` is present in your addons path, remove its directory\n" +"before running the upgrade. Its functionality has been merged into this module.\n" +"\n" +"If the directory is left on disk, the upgrade completes correctly but Odoo will\n" +"rediscover ``account_ebics_batch`` on the next restart and add it back to the\n" +"module list as *Not Installed*. It will not cause errors, but removing it keeps\n" +"the installation clean.\n" +"\n" "Configuration\n" "=============\n" "\n" @@ -263,6 +273,23 @@ msgid "" " :alt: A downloaded camt.053 statement file in Odoo, before processing\n" " :width: 100%\n" "\n" +"Scheduled import\n" +"----------------\n" +"\n" +"A scheduled action **EBICS Batch Import** is created **inactive** at installation, with a\n" +"daily interval. Activate it in *Settings > Technical > Automation > Scheduled Actions*\n" +"(developer mode), and adapt its interval if needed.\n" +"\n" +"The action runs the following method on all confirmed connections::\n" +"\n" +" model._batch_import()\n" +"\n" +"To limit it to specific connections, pass their ids::\n" +"\n" +" model._batch_import(ebics_config_ids=[1, 3])\n" +"\n" +"Batch Import Logs are listed under *EBICS Processing > Batch Import Logs*.\n" +"\n" "Usage\n" "=====\n" "\n" @@ -273,6 +300,10 @@ msgid "" "batch or the payment order, with the format set in the configuration: on the payment\n" "mode for a payment order, on the journal's payment method for a batch payment.\n" "\n" +"Every run of the automatic download via the **EBICS Batch Import** scheduled action\n" +"creates a **Batch Import Log** that records which files were processed and what went wrong;\n" +"the *Reprocess* button retries any files still in draft until all errors are cleared.\n" +"\n" ".. image:: https://raw.githubusercontent.com/Noviat/account_ebics/19.0/account_ebics/static/description/ebics_upload.png\n" " :alt: Uploading a pain.001 SEPA credit transfer file over EBICS 3.0, with the test mode option\n" " :width: 100%\n" @@ -296,16 +327,18 @@ msgid "" "The codes are explained on `ebics.org `_ and in the ``doc`` folder of\n" "this module (``EBICS_Annex1_ReturnCodes``).\n" "\n" -"Electronic Distributed Signature (EDS)\n" -"--------------------------------------\n" +"EBICS TS (Transport and Signature) and EBICS EDS (Electronic Distributed Signature)\n" +"-----------------------------------------------------------------------------------\n" "\n" -"Where your bank supports EBICS T, Odoo prepares the file and holds no signing credentials\n" -"at all: the payment is approved in your own signing application, which is what a segregation\n" -"of duties policy usually demands. Where it does not, which happens with German and Swiss\n" -"banks, the signing key sits on your Odoo server, and you can protect it with a separate\n" -"signature passphrase that is never stored and is asked for every signed transaction.\n" +"When configuring the bank connection as EBICS T, Odoo prepares the file and holds no signing\n" +"credentials at all: the payment is approved in your own signing application, which is what\n" +"a segregation of duties policy usually demands.\n" +"If you prefer not to do this or when the bank's web/mobile banking app does not support\n" +"unsigned payment files, you can upload signed files.\n" +"In this case, the signing key sits on your Odoo server, and you can protect it with\n" +"a separate signature passphrase that is never stored and is asked for every signed transaction.\n" "\n" -"External signing apps include BankingVEU\n" +"You can also explore the use of external signing apps such as BankingVEU\n" "(`Android `_,\n" "`iOS `_).\n" "\n" @@ -320,6 +353,16 @@ msgid "" "Issues and pull requests are welcome on\n" "`GitHub `_.\n" "\n" +"Changelog\n" +"=========\n" +"\n" +"20.0.1.1.0 (2026-11-17)\n" +"------------------------\n" +"\n" +"The automated download of EBICS files (bank statements, payment status reports) was up to\n" +"Odoo 19.0 provided by the ``account_ebics_batch`` module.\n" +"This functionality has now been integrated into the base ``account_ebics`` module.\n" +"\n" "Credits\n" "=======\n" "\n" @@ -447,6 +490,32 @@ msgstr "" msgid "Bank Statements" msgstr "" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__file_ids +msgid "Batch Import EBICS Files" +msgstr "" + +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__note +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Batch Import Log" +msgstr "" + +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__log_ids +msgid "Batch Import Log Items" +msgstr "" + +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Batch Import Logs" +msgstr "" + +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__log_id +msgid "Batch Object" +msgstr "" + #. module: account_ebics #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_change_passphrase_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_xfer_view_form_download @@ -526,6 +595,8 @@ msgstr "" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__create_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__create_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__create_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__create_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__create_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__create_uid @@ -537,6 +608,8 @@ msgstr "" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__create_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__create_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__create_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__create_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__create_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__create_date @@ -559,6 +632,7 @@ msgstr "" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__date_from +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__date_from #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__date_from #: model:ir.model.fields,field_description:account_ebics.field_ebics_xfer__date_from msgid "Date From" @@ -566,6 +640,7 @@ msgstr "" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__date_to +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__date_to #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__date_to #: model:ir.model.fields,field_description:account_ebics.field_ebics_xfer__date_to msgid "Date To" @@ -587,6 +662,8 @@ msgstr "" #: model:ir.model.fields,field_description:account_ebics.field_account_bank_statement__display_name #: model:ir.model.fields,field_description:account_ebics.field_account_journal__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__display_name +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__display_name +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__display_name @@ -597,6 +674,8 @@ msgid "Display Name" msgstr "" #. module: account_ebics +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log__state__done +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log_item__state__done #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__state__done #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_search msgid "Done" @@ -649,6 +728,8 @@ msgid "" msgstr "" #. module: account_ebics +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log__state__draft +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log_item__state__draft #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_config__state__draft #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__pain_state__draft #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__state__draft @@ -709,6 +790,22 @@ msgstr "" msgid "EBICS Banking Protocol" msgstr "" +#. module: account_ebics +#: model:ir.actions.server,name:account_ebics.ir_cron_ebics_batch_import_ir_actions_server +msgid "EBICS Batch Import" +msgstr "" + +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "EBICS Batch Import Log" +msgstr "" + +#. module: account_ebics +#: model:ir.actions.act_window,name:account_ebics.ebics_batch_log_action +#: model:ir.ui.menu,name:account_ebics.ebics_batch_log_menu +msgid "EBICS Batch Import Logs" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_account_journal__ebics_config_id msgid "EBICS Config" @@ -730,6 +827,11 @@ msgstr "" msgid "EBICS Configuration" msgstr "" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__ebics_config_ids +msgid "EBICS Configurations" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_account_bank_statement__ebics_file_id msgid "EBICS Data File" @@ -809,9 +911,15 @@ msgstr "" #. module: account_ebics #: model:ir.ui.menu,name:account_ebics.ebics_file_menu +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form msgid "EBICS Files" msgstr "" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__file_count +msgid "EBICS Files Count" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/wizards/ebics_xfer.py:0 @@ -1151,6 +1259,8 @@ msgid "" msgstr "" #. module: account_ebics +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log__state__error +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log_item__state__error #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__pain_state__error msgid "Error" msgstr "" @@ -1174,6 +1284,12 @@ msgstr "" msgid "Error while accessing the EBICS UserID:" msgstr "" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "Error while processing EBICS connection '%s' :\n" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_file.py:0 @@ -1251,6 +1367,11 @@ msgstr "" msgid "H005 (3.0)" msgstr "" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__has_draft_files +msgid "Has Draft Files" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,help:account_ebics.field_ebics_config__ebics_userid_ids #: model:ir.model.fields,help:account_ebics.field_ebics_userid__name @@ -1263,6 +1384,8 @@ msgstr "" #: model:ir.model.fields,field_description:account_ebics.field_account_bank_statement__id #: model:ir.model.fields,field_description:account_ebics.field_account_journal__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__id +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__id +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__id @@ -1330,6 +1453,8 @@ msgstr "" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__write_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__write_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__write_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__write_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__write_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__write_uid @@ -1341,6 +1466,8 @@ msgstr "" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__write_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__write_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__write_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__write_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__write_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__write_date @@ -1355,6 +1482,11 @@ msgstr "" msgid "Locality Name [L]" msgstr "" +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Mark Done" +msgstr "" + #. module: account_ebics #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_xfer_view_form_mark_as_downloaded msgid "Mark as Downloaded" @@ -1437,6 +1569,14 @@ msgstr "" msgid "No" msgstr "" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "" +"No EBICS UserID with stored passphrase found.\n" +"You should configure such a UserID for automated downloads." +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_file.py:0 @@ -1467,6 +1607,11 @@ msgstr "" msgid "Notes" msgstr "" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__error_count +msgid "Number of Errors" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_file.py:0 @@ -1479,6 +1624,16 @@ msgstr "" msgid "Number of warnings: %(nr)s" msgstr "" +#. module: account_ebics +#: model:ir.model,name:account_ebics.model_ebics_batch_log_item +msgid "Object to store EBICS Batch Import Log Items" +msgstr "" + +#. module: account_ebics +#: model:ir.model,name:account_ebics.model_ebics_batch_log +msgid "Object to store EBICS Batch Import Logs" +msgstr "" + #. module: account_ebics #: model:ir.model,name:account_ebics.model_ebics_file msgid "Object to store EBICS Data Files" @@ -1494,6 +1649,12 @@ msgstr "" msgid "Old Signature Passphrase" msgstr "" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "Only log objects in state 'draft' can be deleted !" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__admin_order_type msgid "Order" @@ -1561,6 +1722,12 @@ msgid "" "Leave this field empty to use the default defined for your EBICS UserID." msgstr "" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "Please set state to 'Confirm' and Reprocess this EBICS Import Log." +msgstr "" + #. module: account_ebics #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_form msgid "Process" @@ -1592,6 +1759,16 @@ msgstr "" msgid "Renew Bank Keys" msgstr "" +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Reprocess" +msgstr "" + +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Reprocess 'draft' EBICS Files" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_file_format__name msgid "Request Type" @@ -1617,6 +1794,11 @@ msgid "" "Either an ISO-3166 ALPHA 2 country code or an issuer code of 3 alphanumeric characters [A-Z0-9]." msgstr "" +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_search +msgid "Search EBICS Batch Import Log Files" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,help:account_ebics.field_ebics_admin_order__format_id #: model:ir.model.fields,help:account_ebics.field_ebics_xfer__format_id @@ -1694,6 +1876,7 @@ msgid "Set to Done" msgstr "" #. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_config_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_userid_view_form @@ -1737,9 +1920,12 @@ msgid "" msgstr "" #. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__state +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__state #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__state #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__state #: model:ir.model.fields,field_description:account_ebics.field_ebics_userid__state +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_search #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_search msgid "State" msgstr "" diff --git a/account_ebics/i18n/de.po b/account_ebics/i18n/de.po index 06bf672..97c3f47 100644 --- a/account_ebics/i18n/de.po +++ b/account_ebics/i18n/de.po @@ -257,9 +257,6 @@ msgid "" "- **EBICS - Odoo Enterprise Integration** (``account_ebics_oe``): required " "on Odoo\n" " Enterprise; installed automatically.\n" -"- **EBICS - Scheduled File Import** (``account_ebics_batch``): downloads and " -"processes the\n" -" files of every connection on a schedule.\n" "- **EBICS - Batch Payments (Odoo Enterprise)** " "(``account_ebics_batch_payment``): uploads\n" " the batch payments of the Odoo Enterprise ``account_batch_payment`` " @@ -317,6 +314,23 @@ msgid "" "Count in weeks per bank rather than days, and start the contract and the " "paperwork early.\n" "\n" +"Installation\n" +"============\n" +"\n" +"**Upgrading from versions prior to account_ebics 20.0.1.1.0**:\n" +"If ``account_ebics_batch`` is present in your addons path, remove its " +"directory\n" +"before running the upgrade. Its functionality has been merged into this " +"module.\n" +"\n" +"If the directory is left on disk, the upgrade completes correctly but Odoo " +"will\n" +"rediscover ``account_ebics_batch`` on the next restart and add it back to " +"the\n" +"module list as *Not Installed*. It will not cause errors, but removing it " +"keeps\n" +"the installation clean.\n" +"\n" "Configuration\n" "=============\n" "\n" @@ -351,6 +365,25 @@ msgid "" " :alt: A downloaded camt.053 statement file in Odoo, before processing\n" " :width: 100%\n" "\n" +"Scheduled import\n" +"----------------\n" +"\n" +"A scheduled action **EBICS Batch Import** is created **inactive** at " +"installation, with a\n" +"daily interval. Activate it in *Settings > Technical > Automation > " +"Scheduled Actions*\n" +"(developer mode), and adapt its interval if needed.\n" +"\n" +"The action runs the following method on all confirmed connections::\n" +"\n" +" model._batch_import()\n" +"\n" +"To limit it to specific connections, pass their ids::\n" +"\n" +" model._batch_import(ebics_config_ids=[1, 3])\n" +"\n" +"Batch Import Logs are listed under *EBICS Processing > Batch Import Logs*.\n" +"\n" "Usage\n" "=====\n" "\n" @@ -365,6 +398,13 @@ msgid "" "mode for a payment order, on the journal's payment method for a batch " "payment.\n" "\n" +"Every run of the automatic download via the **EBICS Batch Import** scheduled " +"action\n" +"creates a **Batch Import Log** that records which files were processed and " +"what went wrong;\n" +"the *Reprocess* button retries any files still in draft until all errors are " +"cleared.\n" +"\n" ".. image:: https://raw.githubusercontent.com/Noviat/account_ebics/19.0/" "account_ebics/static/description/ebics_upload.png\n" " :alt: Uploading a pain.001 SEPA credit transfer file over EBICS 3.0, with " @@ -393,21 +433,24 @@ msgid "" "``doc`` folder of\n" "this module (``EBICS_Annex1_ReturnCodes``).\n" "\n" -"Electronic Distributed Signature (EDS)\n" -"--------------------------------------\n" +"EBICS TS (Transport and Signature) and EBICS EDS (Electronic Distributed " +"Signature)\n" +"-----------------------------------------------------------------------------------\n" "\n" -"Where your bank supports EBICS T, Odoo prepares the file and holds no " -"signing credentials\n" -"at all: the payment is approved in your own signing application, which is " -"what a segregation\n" -"of duties policy usually demands. Where it does not, which happens with " -"German and Swiss\n" -"banks, the signing key sits on your Odoo server, and you can protect it with " -"a separate\n" -"signature passphrase that is never stored and is asked for every signed " -"transaction.\n" +"When configuring the bank connection as EBICS T, Odoo prepares the file and " +"holds no signing\n" +"credentials at all: the payment is approved in your own signing application, " +"which is what\n" +"a segregation of duties policy usually demands.\n" +"If you prefer not to do this or when the bank's web/mobile banking app does " +"not support\n" +"unsigned payment files, you can upload signed files.\n" +"In this case, the signing key sits on your Odoo server, and you can protect " +"it with\n" +"a separate signature passphrase that is never stored and is asked for every " +"signed transaction.\n" "\n" -"External signing apps include BankingVEU\n" +"You can also explore the use of external signing apps such as BankingVEU\n" "(`Android `_,\n" "`iOS `_).\n" @@ -424,6 +467,18 @@ msgid "" "Issues and pull requests are welcome on\n" "`GitHub `_.\n" "\n" +"Changelog\n" +"=========\n" +"\n" +"20.0.1.1.0 (2026-11-17)\n" +"------------------------\n" +"\n" +"The automated download of EBICS files (bank statements, payment status " +"reports) was up to\n" +"Odoo 19.0 provided by the ``account_ebics_batch`` module.\n" +"This functionality has now been integrated into the base ``account_ebics`` " +"module.\n" +"\n" "Credits\n" "=======\n" "\n" @@ -562,6 +617,32 @@ msgstr "Kontoauszug" msgid "Bank Statements" msgstr "Kontoauszüge" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__file_ids +msgid "Batch Import EBICS Files" +msgstr "" + +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__note +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Batch Import Log" +msgstr "" + +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__log_ids +msgid "Batch Import Log Items" +msgstr "" + +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Batch Import Logs" +msgstr "" + +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__log_id +msgid "Batch Object" +msgstr "" + #. module: account_ebics #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_change_passphrase_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_xfer_view_form_download @@ -646,6 +727,8 @@ msgstr "Ländername [C]" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__create_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__create_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__create_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__create_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__create_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__create_uid @@ -657,6 +740,8 @@ msgstr "Erstellt von" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__create_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__create_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__create_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__create_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__create_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__create_date @@ -679,6 +764,7 @@ msgstr "Datum" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__date_from +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__date_from #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__date_from #: model:ir.model.fields,field_description:account_ebics.field_ebics_xfer__date_from msgid "Date From" @@ -686,6 +772,7 @@ msgstr "Startdatum" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__date_to +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__date_to #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__date_to #: model:ir.model.fields,field_description:account_ebics.field_ebics_xfer__date_to msgid "Date To" @@ -709,6 +796,8 @@ msgstr "Artikelnr. & Bezeichnung" #: model:ir.model.fields,field_description:account_ebics.field_account_bank_statement__display_name #: model:ir.model.fields,field_description:account_ebics.field_account_journal__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__display_name +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__display_name +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__display_name @@ -719,6 +808,8 @@ msgid "Display Name" msgstr "Anzeigename" #. module: account_ebics +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log__state__done +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log_item__state__done #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__state__done #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_search msgid "Done" @@ -771,6 +862,8 @@ msgid "" msgstr "" #. module: account_ebics +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log__state__draft +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log_item__state__draft #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_config__state__draft #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__pain_state__draft #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__state__draft @@ -844,6 +937,22 @@ msgstr "EBICS-Verwaltungsaufträge" msgid "EBICS Banking Protocol" msgstr "" +#. module: account_ebics +#: model:ir.actions.server,name:account_ebics.ir_cron_ebics_batch_import_ir_actions_server +msgid "EBICS Batch Import" +msgstr "" + +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "EBICS Batch Import Log" +msgstr "" + +#. module: account_ebics +#: model:ir.actions.act_window,name:account_ebics.ebics_batch_log_action +#: model:ir.ui.menu,name:account_ebics.ebics_batch_log_menu +msgid "EBICS Batch Import Logs" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_account_journal__ebics_config_id msgid "EBICS Config" @@ -865,6 +974,11 @@ msgstr "EBICS-Konfigurationen" msgid "EBICS Configuration" msgstr "EBICS-Konfiguration" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__ebics_config_ids +msgid "EBICS Configurations" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_account_bank_statement__ebics_file_id msgid "EBICS Data File" @@ -948,9 +1062,15 @@ msgstr "" #. module: account_ebics #: model:ir.ui.menu,name:account_ebics.ebics_file_menu +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form msgid "EBICS Files" msgstr "EBICS-Dateien" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__file_count +msgid "EBICS Files Count" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/wizards/ebics_xfer.py:0 @@ -1311,6 +1431,8 @@ msgstr "" "Datei zu importieren und einen Kontoauszug zu erstellen." #. module: account_ebics +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log__state__error +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log_item__state__error #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__pain_state__error msgid "Error" msgstr "Fehler" @@ -1336,6 +1458,12 @@ msgstr "Fehler beim Zugriff auf die EBICS-Schlüssel:" msgid "Error while accessing the EBICS UserID:" msgstr "Fehler beim Zugriff auf die EBICS-UserID:" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "Error while processing EBICS connection '%s' :\n" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_file.py:0 @@ -1413,6 +1541,11 @@ msgstr "H004 (2.5)" msgid "H005 (3.0)" msgstr "H005 (3.0)" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__has_draft_files +msgid "Has Draft Files" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,help:account_ebics.field_ebics_config__ebics_userid_ids #: model:ir.model.fields,help:account_ebics.field_ebics_userid__name @@ -1434,6 +1567,8 @@ msgstr "" #: model:ir.model.fields,field_description:account_ebics.field_account_bank_statement__id #: model:ir.model.fields,field_description:account_ebics.field_account_journal__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__id +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__id +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__id @@ -1503,6 +1638,8 @@ msgstr "Journal" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__write_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__write_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__write_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__write_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__write_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__write_uid @@ -1514,6 +1651,8 @@ msgstr "Zuletzt aktualisiert durch" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__write_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__write_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__write_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__write_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__write_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__write_date @@ -1528,6 +1667,11 @@ msgstr "Zuletzt aktualisiert am" msgid "Locality Name [L]" msgstr "Ortsname [L]" +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Mark Done" +msgstr "" + #. module: account_ebics #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_xfer_view_form_mark_as_downloaded msgid "Mark as Downloaded" @@ -1613,6 +1757,14 @@ msgstr "Fehler bei der Überprüfung der neuen Signatur-Passphrase." msgid "No" msgstr "" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "" +"No EBICS UserID with stored passphrase found.\n" +"You should configure such a UserID for automated downloads." +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_file.py:0 @@ -1643,6 +1795,11 @@ msgstr "Kein Finanzjournal für Kontonummer %(nbr)s, Währung %(cc)s gefunden" msgid "Notes" msgstr "Notizen" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__error_count +msgid "Number of Errors" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_file.py:0 @@ -1655,6 +1812,16 @@ msgstr "Anzahl Fehler: %(nr)s" msgid "Number of warnings: %(nr)s" msgstr "Anzahl Warnungen: %(nr)s" +#. module: account_ebics +#: model:ir.model,name:account_ebics.model_ebics_batch_log_item +msgid "Object to store EBICS Batch Import Log Items" +msgstr "" + +#. module: account_ebics +#: model:ir.model,name:account_ebics.model_ebics_batch_log +msgid "Object to store EBICS Batch Import Logs" +msgstr "" + #. module: account_ebics #: model:ir.model,name:account_ebics.model_ebics_file msgid "Object to store EBICS Data Files" @@ -1670,6 +1837,12 @@ msgstr "Alte Passphrase" msgid "Old Signature Passphrase" msgstr "Alte Signatur-Passphrase" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "Only log objects in state 'draft' can be deleted !" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__admin_order_type msgid "Order" @@ -1756,6 +1929,12 @@ msgstr "" "Lassen Sie dieses Feld leer, um den für Ihre EBICS-UserID definierten " "Standard zu verwenden." +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "Please set state to 'Confirm' and Reprocess this EBICS Import Log." +msgstr "" + #. module: account_ebics #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_form msgid "Process" @@ -1787,6 +1966,16 @@ msgstr "EBICS-Datei verarbeiten" msgid "Renew Bank Keys" msgstr "Bankschlüssel erneuern" +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Reprocess" +msgstr "" + +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Reprocess 'draft' EBICS Files" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_file_format__name msgid "Request Type" @@ -1816,6 +2005,11 @@ msgstr "" "Entweder ein Ländercode nach ISO-3166 ALPHA 2 oder ein Herausgebercode aus 3 " "alphanumerischen Zeichen [A-Z0-9]." +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_search +msgid "Search EBICS Batch Import Log Files" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,help:account_ebics.field_ebics_admin_order__format_id #: model:ir.model.fields,help:account_ebics.field_ebics_xfer__format_id @@ -1904,6 +2098,7 @@ msgid "Set to Done" msgstr "Auf Erledigt setzen" #. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_config_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_userid_view_form @@ -1952,9 +2147,12 @@ msgstr "" "Diese Nummer muss folgendem Muster entsprechen: [A-Z]{1}[A-Z0-9]{3}" #. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__state +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__state #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__state #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__state #: model:ir.model.fields,field_description:account_ebics.field_ebics_userid__state +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_search #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_search msgid "State" msgstr "Status" diff --git a/account_ebics/i18n/fr.po b/account_ebics/i18n/fr.po index ec1f82f..cbb2e81 100644 --- a/account_ebics/i18n/fr.po +++ b/account_ebics/i18n/fr.po @@ -257,9 +257,6 @@ msgid "" "- **EBICS - Odoo Enterprise Integration** (``account_ebics_oe``): required " "on Odoo\n" " Enterprise; installed automatically.\n" -"- **EBICS - Scheduled File Import** (``account_ebics_batch``): downloads and " -"processes the\n" -" files of every connection on a schedule.\n" "- **EBICS - Batch Payments (Odoo Enterprise)** " "(``account_ebics_batch_payment``): uploads\n" " the batch payments of the Odoo Enterprise ``account_batch_payment`` " @@ -317,6 +314,23 @@ msgid "" "Count in weeks per bank rather than days, and start the contract and the " "paperwork early.\n" "\n" +"Installation\n" +"============\n" +"\n" +"**Upgrading from versions prior to account_ebics 20.0.1.1.0**:\n" +"If ``account_ebics_batch`` is present in your addons path, remove its " +"directory\n" +"before running the upgrade. Its functionality has been merged into this " +"module.\n" +"\n" +"If the directory is left on disk, the upgrade completes correctly but Odoo " +"will\n" +"rediscover ``account_ebics_batch`` on the next restart and add it back to " +"the\n" +"module list as *Not Installed*. It will not cause errors, but removing it " +"keeps\n" +"the installation clean.\n" +"\n" "Configuration\n" "=============\n" "\n" @@ -351,6 +365,25 @@ msgid "" " :alt: A downloaded camt.053 statement file in Odoo, before processing\n" " :width: 100%\n" "\n" +"Scheduled import\n" +"----------------\n" +"\n" +"A scheduled action **EBICS Batch Import** is created **inactive** at " +"installation, with a\n" +"daily interval. Activate it in *Settings > Technical > Automation > " +"Scheduled Actions*\n" +"(developer mode), and adapt its interval if needed.\n" +"\n" +"The action runs the following method on all confirmed connections::\n" +"\n" +" model._batch_import()\n" +"\n" +"To limit it to specific connections, pass their ids::\n" +"\n" +" model._batch_import(ebics_config_ids=[1, 3])\n" +"\n" +"Batch Import Logs are listed under *EBICS Processing > Batch Import Logs*.\n" +"\n" "Usage\n" "=====\n" "\n" @@ -365,6 +398,13 @@ msgid "" "mode for a payment order, on the journal's payment method for a batch " "payment.\n" "\n" +"Every run of the automatic download via the **EBICS Batch Import** scheduled " +"action\n" +"creates a **Batch Import Log** that records which files were processed and " +"what went wrong;\n" +"the *Reprocess* button retries any files still in draft until all errors are " +"cleared.\n" +"\n" ".. image:: https://raw.githubusercontent.com/Noviat/account_ebics/19.0/" "account_ebics/static/description/ebics_upload.png\n" " :alt: Uploading a pain.001 SEPA credit transfer file over EBICS 3.0, with " @@ -393,21 +433,24 @@ msgid "" "``doc`` folder of\n" "this module (``EBICS_Annex1_ReturnCodes``).\n" "\n" -"Electronic Distributed Signature (EDS)\n" -"--------------------------------------\n" +"EBICS TS (Transport and Signature) and EBICS EDS (Electronic Distributed " +"Signature)\n" +"-----------------------------------------------------------------------------------\n" "\n" -"Where your bank supports EBICS T, Odoo prepares the file and holds no " -"signing credentials\n" -"at all: the payment is approved in your own signing application, which is " -"what a segregation\n" -"of duties policy usually demands. Where it does not, which happens with " -"German and Swiss\n" -"banks, the signing key sits on your Odoo server, and you can protect it with " -"a separate\n" -"signature passphrase that is never stored and is asked for every signed " -"transaction.\n" +"When configuring the bank connection as EBICS T, Odoo prepares the file and " +"holds no signing\n" +"credentials at all: the payment is approved in your own signing application, " +"which is what\n" +"a segregation of duties policy usually demands.\n" +"If you prefer not to do this or when the bank's web/mobile banking app does " +"not support\n" +"unsigned payment files, you can upload signed files.\n" +"In this case, the signing key sits on your Odoo server, and you can protect " +"it with\n" +"a separate signature passphrase that is never stored and is asked for every " +"signed transaction.\n" "\n" -"External signing apps include BankingVEU\n" +"You can also explore the use of external signing apps such as BankingVEU\n" "(`Android `_,\n" "`iOS `_).\n" @@ -424,6 +467,18 @@ msgid "" "Issues and pull requests are welcome on\n" "`GitHub `_.\n" "\n" +"Changelog\n" +"=========\n" +"\n" +"20.0.1.1.0 (2026-11-17)\n" +"------------------------\n" +"\n" +"The automated download of EBICS files (bank statements, payment status " +"reports) was up to\n" +"Odoo 19.0 provided by the ``account_ebics_batch`` module.\n" +"This functionality has now been integrated into the base ``account_ebics`` " +"module.\n" +"\n" "Credits\n" "=======\n" "\n" @@ -562,6 +617,32 @@ msgstr "Relevé bancaire" msgid "Bank Statements" msgstr "Relevés" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__file_ids +msgid "Batch Import EBICS Files" +msgstr "" + +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__note +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Batch Import Log" +msgstr "" + +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__log_ids +msgid "Batch Import Log Items" +msgstr "" + +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Batch Import Logs" +msgstr "" + +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__log_id +msgid "Batch Object" +msgstr "" + #. module: account_ebics #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_change_passphrase_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_xfer_view_form_download @@ -646,6 +727,8 @@ msgstr "Nom du pays [C]" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__create_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__create_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__create_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__create_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__create_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__create_uid @@ -657,6 +740,8 @@ msgstr "Créé par" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__create_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__create_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__create_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__create_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__create_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__create_date @@ -679,6 +764,7 @@ msgstr "Date" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__date_from +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__date_from #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__date_from #: model:ir.model.fields,field_description:account_ebics.field_ebics_xfer__date_from msgid "Date From" @@ -686,6 +772,7 @@ msgstr "Du" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__date_to +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__date_to #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__date_to #: model:ir.model.fields,field_description:account_ebics.field_ebics_xfer__date_to msgid "Date To" @@ -709,6 +796,8 @@ msgstr "Description" #: model:ir.model.fields,field_description:account_ebics.field_account_bank_statement__display_name #: model:ir.model.fields,field_description:account_ebics.field_account_journal__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__display_name +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__display_name +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__display_name @@ -719,6 +808,8 @@ msgid "Display Name" msgstr "Nom affiché" #. module: account_ebics +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log__state__done +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log_item__state__done #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__state__done #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_search msgid "Done" @@ -771,6 +862,8 @@ msgid "" msgstr "" #. module: account_ebics +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log__state__draft +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log_item__state__draft #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_config__state__draft #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__pain_state__draft #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__state__draft @@ -844,6 +937,22 @@ msgstr "Ordres administratifs EBICS" msgid "EBICS Banking Protocol" msgstr "" +#. module: account_ebics +#: model:ir.actions.server,name:account_ebics.ir_cron_ebics_batch_import_ir_actions_server +msgid "EBICS Batch Import" +msgstr "" + +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "EBICS Batch Import Log" +msgstr "" + +#. module: account_ebics +#: model:ir.actions.act_window,name:account_ebics.ebics_batch_log_action +#: model:ir.ui.menu,name:account_ebics.ebics_batch_log_menu +msgid "EBICS Batch Import Logs" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_account_journal__ebics_config_id msgid "EBICS Config" @@ -865,6 +974,11 @@ msgstr "Configurations EBICS" msgid "EBICS Configuration" msgstr "Configuration EBICS" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__ebics_config_ids +msgid "EBICS Configurations" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_account_bank_statement__ebics_file_id msgid "EBICS Data File" @@ -948,9 +1062,15 @@ msgstr "" #. module: account_ebics #: model:ir.ui.menu,name:account_ebics.ebics_file_menu +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form msgid "EBICS Files" msgstr "Fichiers EBICS" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__file_count +msgid "EBICS Files Count" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/wizards/ebics_xfer.py:0 @@ -1308,6 +1428,8 @@ msgstr "" "et créer un relevé bancaire." #. module: account_ebics +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log__state__error +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log_item__state__error #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__pain_state__error msgid "Error" msgstr "Erreur" @@ -1333,6 +1455,12 @@ msgstr "Erreur lors de l'accès aux clés EBICS :" msgid "Error while accessing the EBICS UserID:" msgstr "Erreur lors de l'accès à l'UserID EBICS :" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "Error while processing EBICS connection '%s' :\n" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_file.py:0 @@ -1410,6 +1538,11 @@ msgstr "H004 (2.5)" msgid "H005 (3.0)" msgstr "H005 (3.0)" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__has_draft_files +msgid "Has Draft Files" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,help:account_ebics.field_ebics_config__ebics_userid_ids #: model:ir.model.fields,help:account_ebics.field_ebics_userid__name @@ -1430,6 +1563,8 @@ msgstr "" #: model:ir.model.fields,field_description:account_ebics.field_account_bank_statement__id #: model:ir.model.fields,field_description:account_ebics.field_account_journal__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__id +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__id +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__id @@ -1499,6 +1634,8 @@ msgstr "Journal" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__write_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__write_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__write_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__write_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__write_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__write_uid @@ -1510,6 +1647,8 @@ msgstr "Dernière mise à jour par" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__write_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__write_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__write_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__write_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__write_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__write_date @@ -1524,6 +1663,11 @@ msgstr "Dernière mise à jour le" msgid "Locality Name [L]" msgstr "Nom de la localité [L]" +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Mark Done" +msgstr "" + #. module: account_ebics #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_xfer_view_form_mark_as_downloaded msgid "Mark as Downloaded" @@ -1609,6 +1753,14 @@ msgstr "Erreur de vérification de la nouvelle phrase secrète de signature." msgid "No" msgstr "" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "" +"No EBICS UserID with stored passphrase found.\n" +"You should configure such a UserID for automated downloads." +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_file.py:0 @@ -1641,6 +1793,11 @@ msgstr "" msgid "Notes" msgstr "Remarques" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__error_count +msgid "Number of Errors" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_file.py:0 @@ -1653,6 +1810,16 @@ msgstr "Nombre d'erreurs : %(nr)s" msgid "Number of warnings: %(nr)s" msgstr "Nombre d'avertissements : %(nr)s" +#. module: account_ebics +#: model:ir.model,name:account_ebics.model_ebics_batch_log_item +msgid "Object to store EBICS Batch Import Log Items" +msgstr "" + +#. module: account_ebics +#: model:ir.model,name:account_ebics.model_ebics_batch_log +msgid "Object to store EBICS Batch Import Logs" +msgstr "" + #. module: account_ebics #: model:ir.model,name:account_ebics.model_ebics_file msgid "Object to store EBICS Data Files" @@ -1668,6 +1835,12 @@ msgstr "Ancienne phrase secrète" msgid "Old Signature Passphrase" msgstr "Ancienne phrase secrète de signature" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "Only log objects in state 'draft' can be deleted !" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__admin_order_type msgid "Order" @@ -1754,6 +1927,12 @@ msgstr "" "Laissez ce champ vide pour utiliser la valeur par défaut définie pour votre " "EBICS UserID." +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "Please set state to 'Confirm' and Reprocess this EBICS Import Log." +msgstr "" + #. module: account_ebics #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_form msgid "Process" @@ -1785,6 +1964,16 @@ msgstr "Traiter le fichier EBICS" msgid "Renew Bank Keys" msgstr "Renouveler les clés bancaires" +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Reprocess" +msgstr "" + +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Reprocess 'draft' EBICS Files" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_file_format__name msgid "Request Type" @@ -1814,6 +2003,11 @@ msgstr "" "Soit un code pays ISO-3166 ALPHA 2, soit un code émetteur de 3 caractères " "alphanumériques [A-Z0-9]." +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_search +msgid "Search EBICS Batch Import Log Files" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,help:account_ebics.field_ebics_admin_order__format_id #: model:ir.model.fields,help:account_ebics.field_ebics_xfer__format_id @@ -1900,6 +2094,7 @@ msgid "Set to Done" msgstr "Mettre sur Terminé" #. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_config_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_userid_view_form @@ -1948,9 +2143,12 @@ msgstr "" "Ce numéro doit correspondre au modèle suivant : [A-Z]{1}[A-Z0-9]{3}" #. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__state +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__state #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__state #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__state #: model:ir.model.fields,field_description:account_ebics.field_ebics_userid__state +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_search #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_search msgid "State" msgstr "Statut" diff --git a/account_ebics/i18n/nl.po b/account_ebics/i18n/nl.po index 2301980..d865201 100644 --- a/account_ebics/i18n/nl.po +++ b/account_ebics/i18n/nl.po @@ -256,9 +256,6 @@ msgid "" "- **EBICS - Odoo Enterprise Integration** (``account_ebics_oe``): required " "on Odoo\n" " Enterprise; installed automatically.\n" -"- **EBICS - Scheduled File Import** (``account_ebics_batch``): downloads and " -"processes the\n" -" files of every connection on a schedule.\n" "- **EBICS - Batch Payments (Odoo Enterprise)** " "(``account_ebics_batch_payment``): uploads\n" " the batch payments of the Odoo Enterprise ``account_batch_payment`` " @@ -316,6 +313,23 @@ msgid "" "Count in weeks per bank rather than days, and start the contract and the " "paperwork early.\n" "\n" +"Installation\n" +"============\n" +"\n" +"**Upgrading from versions prior to account_ebics 20.0.1.1.0**:\n" +"If ``account_ebics_batch`` is present in your addons path, remove its " +"directory\n" +"before running the upgrade. Its functionality has been merged into this " +"module.\n" +"\n" +"If the directory is left on disk, the upgrade completes correctly but Odoo " +"will\n" +"rediscover ``account_ebics_batch`` on the next restart and add it back to " +"the\n" +"module list as *Not Installed*. It will not cause errors, but removing it " +"keeps\n" +"the installation clean.\n" +"\n" "Configuration\n" "=============\n" "\n" @@ -350,6 +364,25 @@ msgid "" " :alt: A downloaded camt.053 statement file in Odoo, before processing\n" " :width: 100%\n" "\n" +"Scheduled import\n" +"----------------\n" +"\n" +"A scheduled action **EBICS Batch Import** is created **inactive** at " +"installation, with a\n" +"daily interval. Activate it in *Settings > Technical > Automation > " +"Scheduled Actions*\n" +"(developer mode), and adapt its interval if needed.\n" +"\n" +"The action runs the following method on all confirmed connections::\n" +"\n" +" model._batch_import()\n" +"\n" +"To limit it to specific connections, pass their ids::\n" +"\n" +" model._batch_import(ebics_config_ids=[1, 3])\n" +"\n" +"Batch Import Logs are listed under *EBICS Processing > Batch Import Logs*.\n" +"\n" "Usage\n" "=====\n" "\n" @@ -364,6 +397,13 @@ msgid "" "mode for a payment order, on the journal's payment method for a batch " "payment.\n" "\n" +"Every run of the automatic download via the **EBICS Batch Import** scheduled " +"action\n" +"creates a **Batch Import Log** that records which files were processed and " +"what went wrong;\n" +"the *Reprocess* button retries any files still in draft until all errors are " +"cleared.\n" +"\n" ".. image:: https://raw.githubusercontent.com/Noviat/account_ebics/19.0/" "account_ebics/static/description/ebics_upload.png\n" " :alt: Uploading a pain.001 SEPA credit transfer file over EBICS 3.0, with " @@ -392,21 +432,24 @@ msgid "" "``doc`` folder of\n" "this module (``EBICS_Annex1_ReturnCodes``).\n" "\n" -"Electronic Distributed Signature (EDS)\n" -"--------------------------------------\n" +"EBICS TS (Transport and Signature) and EBICS EDS (Electronic Distributed " +"Signature)\n" +"-----------------------------------------------------------------------------------\n" "\n" -"Where your bank supports EBICS T, Odoo prepares the file and holds no " -"signing credentials\n" -"at all: the payment is approved in your own signing application, which is " -"what a segregation\n" -"of duties policy usually demands. Where it does not, which happens with " -"German and Swiss\n" -"banks, the signing key sits on your Odoo server, and you can protect it with " -"a separate\n" -"signature passphrase that is never stored and is asked for every signed " -"transaction.\n" +"When configuring the bank connection as EBICS T, Odoo prepares the file and " +"holds no signing\n" +"credentials at all: the payment is approved in your own signing application, " +"which is what\n" +"a segregation of duties policy usually demands.\n" +"If you prefer not to do this or when the bank's web/mobile banking app does " +"not support\n" +"unsigned payment files, you can upload signed files.\n" +"In this case, the signing key sits on your Odoo server, and you can protect " +"it with\n" +"a separate signature passphrase that is never stored and is asked for every " +"signed transaction.\n" "\n" -"External signing apps include BankingVEU\n" +"You can also explore the use of external signing apps such as BankingVEU\n" "(`Android `_,\n" "`iOS `_).\n" @@ -423,6 +466,18 @@ msgid "" "Issues and pull requests are welcome on\n" "`GitHub `_.\n" "\n" +"Changelog\n" +"=========\n" +"\n" +"20.0.1.1.0 (2026-11-17)\n" +"------------------------\n" +"\n" +"The automated download of EBICS files (bank statements, payment status " +"reports) was up to\n" +"Odoo 19.0 provided by the ``account_ebics_batch`` module.\n" +"This functionality has now been integrated into the base ``account_ebics`` " +"module.\n" +"\n" "Credits\n" "=======\n" "\n" @@ -561,6 +616,32 @@ msgstr "Rekeningafschrift" msgid "Bank Statements" msgstr "Afschriften" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__file_ids +msgid "Batch Import EBICS Files" +msgstr "" + +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__note +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Batch Import Log" +msgstr "" + +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__log_ids +msgid "Batch Import Log Items" +msgstr "" + +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Batch Import Logs" +msgstr "" + +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__log_id +msgid "Batch Object" +msgstr "" + #. module: account_ebics #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_change_passphrase_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_xfer_view_form_download @@ -644,6 +725,8 @@ msgstr "Landnaam [C]" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__create_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__create_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__create_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__create_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__create_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__create_uid @@ -655,6 +738,8 @@ msgstr "Gemaakt door" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__create_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__create_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__create_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__create_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__create_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__create_date @@ -677,6 +762,7 @@ msgstr "Datum" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__date_from +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__date_from #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__date_from #: model:ir.model.fields,field_description:account_ebics.field_ebics_xfer__date_from msgid "Date From" @@ -684,6 +770,7 @@ msgstr "Vanaf" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__date_to +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__date_to #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__date_to #: model:ir.model.fields,field_description:account_ebics.field_ebics_xfer__date_to msgid "Date To" @@ -707,6 +794,8 @@ msgstr "Omschrijving" #: model:ir.model.fields,field_description:account_ebics.field_account_bank_statement__display_name #: model:ir.model.fields,field_description:account_ebics.field_account_journal__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__display_name +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__display_name +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__display_name #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__display_name @@ -717,6 +806,8 @@ msgid "Display Name" msgstr "Weergavenaam" #. module: account_ebics +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log__state__done +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log_item__state__done #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__state__done #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_search msgid "Done" @@ -769,6 +860,8 @@ msgid "" msgstr "" #. module: account_ebics +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log__state__draft +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log_item__state__draft #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_config__state__draft #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__pain_state__draft #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__state__draft @@ -842,6 +935,22 @@ msgstr "EBICS administratieve orders" msgid "EBICS Banking Protocol" msgstr "" +#. module: account_ebics +#: model:ir.actions.server,name:account_ebics.ir_cron_ebics_batch_import_ir_actions_server +msgid "EBICS Batch Import" +msgstr "" + +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "EBICS Batch Import Log" +msgstr "" + +#. module: account_ebics +#: model:ir.actions.act_window,name:account_ebics.ebics_batch_log_action +#: model:ir.ui.menu,name:account_ebics.ebics_batch_log_menu +msgid "EBICS Batch Import Logs" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_account_journal__ebics_config_id msgid "EBICS Config" @@ -863,6 +972,11 @@ msgstr "EBICS-configuraties" msgid "EBICS Configuration" msgstr "EBICS-configuratie" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__ebics_config_ids +msgid "EBICS Configurations" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_account_bank_statement__ebics_file_id msgid "EBICS Data File" @@ -946,9 +1060,15 @@ msgstr "" #. module: account_ebics #: model:ir.ui.menu,name:account_ebics.ebics_file_menu +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form msgid "EBICS Files" msgstr "EBICS-bestanden" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__file_count +msgid "EBICS Files Count" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/wizards/ebics_xfer.py:0 @@ -1307,6 +1427,8 @@ msgstr "" "importeren en een rekeninguittreksel aan te maken." #. module: account_ebics +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log__state__error +#: model:ir.model.fields.selection,name:account_ebics.selection__ebics_batch_log_item__state__error #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__pain_state__error msgid "Error" msgstr "Fout" @@ -1332,6 +1454,12 @@ msgstr "Fout bij toegang tot de EBICS-sleutels:" msgid "Error while accessing the EBICS UserID:" msgstr "Fout bij toegang tot de EBICS UserID:" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "Error while processing EBICS connection '%s' :\n" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_file.py:0 @@ -1409,6 +1537,11 @@ msgstr "H004 (2.5)" msgid "H005 (3.0)" msgstr "H005 (3.0)" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__has_draft_files +msgid "Has Draft Files" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,help:account_ebics.field_ebics_config__ebics_userid_ids #: model:ir.model.fields,help:account_ebics.field_ebics_userid__name @@ -1430,6 +1563,8 @@ msgstr "" #: model:ir.model.fields,field_description:account_ebics.field_account_bank_statement__id #: model:ir.model.fields,field_description:account_ebics.field_account_journal__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__id +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__id +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__id #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__id @@ -1499,6 +1634,8 @@ msgstr "Dagboek" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__write_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__write_uid +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__write_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__write_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__write_uid #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__write_uid @@ -1510,6 +1647,8 @@ msgstr "Laatst bijgewerkt door" #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__write_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__write_date +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__write_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_change_passphrase__write_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__write_date #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__write_date @@ -1524,6 +1663,11 @@ msgstr "Laatst bijgewerkt op" msgid "Locality Name [L]" msgstr "Naam van de plaats [L]" +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Mark Done" +msgstr "" + #. module: account_ebics #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_xfer_view_form_mark_as_downloaded msgid "Mark as Downloaded" @@ -1609,6 +1753,14 @@ msgstr "Verificatiefout van de nieuwe handtekening-wachtwoordzin." msgid "No" msgstr "" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "" +"No EBICS UserID with stored passphrase found.\n" +"You should configure such a UserID for automated downloads." +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_file.py:0 @@ -1640,6 +1792,11 @@ msgstr "" msgid "Notes" msgstr "Opmerkingen" +#. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__error_count +msgid "Number of Errors" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_file.py:0 @@ -1652,6 +1809,16 @@ msgstr "Aantal fouten: %(nr)s" msgid "Number of warnings: %(nr)s" msgstr "Aantal waarschuwingen: %(nr)s" +#. module: account_ebics +#: model:ir.model,name:account_ebics.model_ebics_batch_log_item +msgid "Object to store EBICS Batch Import Log Items" +msgstr "" + +#. module: account_ebics +#: model:ir.model,name:account_ebics.model_ebics_batch_log +msgid "Object to store EBICS Batch Import Logs" +msgstr "" + #. module: account_ebics #: model:ir.model,name:account_ebics.model_ebics_file msgid "Object to store EBICS Data Files" @@ -1667,6 +1834,12 @@ msgstr "Oude wachtwoordzin" msgid "Old Signature Passphrase" msgstr "Oude handtekening-wachtwoordzin" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "Only log objects in state 'draft' can be deleted !" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_admin_order__admin_order_type msgid "Order" @@ -1753,6 +1926,12 @@ msgstr "" "Laat dit veld leeg om de standaardwaarde te gebruiken die is gedefinieerd " "voor uw EBICS UserID." +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/models/ebics_batch_log.py:0 +msgid "Please set state to 'Confirm' and Reprocess this EBICS Import Log." +msgstr "" + #. module: account_ebics #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_form msgid "Process" @@ -1784,6 +1963,16 @@ msgstr "Het EBICS-bestand verwerken" msgid "Renew Bank Keys" msgstr "Bankkeys vernieuwen" +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Reprocess" +msgstr "" + +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form +msgid "Reprocess 'draft' EBICS Files" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,field_description:account_ebics.field_ebics_file_format__name msgid "Request Type" @@ -1813,6 +2002,11 @@ msgstr "" "Ofwel een ISO-3166 ALPHA 2-landcode, ofwel een uitgevercode van 3 " "alfanumerieke tekens [A-Z0-9]." +#. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_search +msgid "Search EBICS Batch Import Log Files" +msgstr "" + #. module: account_ebics #: model:ir.model.fields,help:account_ebics.field_ebics_admin_order__format_id #: model:ir.model.fields,help:account_ebics.field_ebics_xfer__format_id @@ -1897,6 +2091,7 @@ msgid "Set to Done" msgstr "Op Klaar zetten" #. module: account_ebics +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_config_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_form #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_userid_view_form @@ -1944,9 +2139,12 @@ msgstr "" "Dit nummer moet overeenkomen met het volgende patroon: [A-Z]{1}[A-Z0-9]{3}" #. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log__state +#: model:ir.model.fields,field_description:account_ebics.field_ebics_batch_log_item__state #: model:ir.model.fields,field_description:account_ebics.field_ebics_config__state #: model:ir.model.fields,field_description:account_ebics.field_ebics_file__state #: model:ir.model.fields,field_description:account_ebics.field_ebics_userid__state +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_batch_log_view_search #: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_search msgid "State" msgstr "Status" diff --git a/account_ebics/migrations/20.0.1.1/end-migrate.py b/account_ebics/migrations/20.0.1.1/end-migrate.py new file mode 100644 index 0000000..31a7094 --- /dev/null +++ b/account_ebics/migrations/20.0.1.1/end-migrate.py @@ -0,0 +1,12 @@ +# Copyright 2026 Noviat. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from odoo.upgrade import util + + +def migrate(cr, version): + """ + Remove account_ebics_batch module record and its meta-entries since this + module is now merged into the base account_ebics module. + """ + util.remove_module(cr, "account_ebics_batch") diff --git a/account_ebics/migrations/20.0.1.1/pre-migrate.py b/account_ebics/migrations/20.0.1.1/pre-migrate.py new file mode 100644 index 0000000..7ef9ff8 --- /dev/null +++ b/account_ebics/migrations/20.0.1.1/pre-migrate.py @@ -0,0 +1,22 @@ +# Copyright 2026 Noviat. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from openupgradelib import openupgrade + + +def migrate(cr, version): + openupgrade.logged_query( + cr, + """ + UPDATE ir_model_data SET module = 'account_ebics' + WHERE module = 'account_ebics_batch' + AND name NOT IN ( + SELECT name FROM ir_model_data WHERE module = 'account_ebics' + ) + """, + ) + openupgrade.logged_query( + cr, + "UPDATE ir_module_module_dependency SET name = 'account_ebics'" + " WHERE name = 'account_ebics_batch'", + ) diff --git a/account_ebics/models/__init__.py b/account_ebics/models/__init__.py index 4b04a91..c7eb7c5 100644 --- a/account_ebics/models/__init__.py +++ b/account_ebics/models/__init__.py @@ -5,3 +5,4 @@ from . import ebics_config from . import ebics_file from . import ebics_file_format from . import ebics_userid +from . import ebics_batch_log diff --git a/account_ebics/models/ebics_batch_log.py b/account_ebics/models/ebics_batch_log.py new file mode 100644 index 0000000..915eabc --- /dev/null +++ b/account_ebics/models/ebics_batch_log.py @@ -0,0 +1,207 @@ +# Copyright 2022 Noviat. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from sys import exc_info +from traceback import format_exception + +from odoo import SUPERUSER_ID, api, fields, models +from odoo.exceptions import UserError + + +class EbicsBatchLog(models.Model): + _name = "ebics.batch.log" + _description = "Object to store EBICS Batch Import Logs" + _order = "create_date desc" + + date_from = fields.Date() + date_to = fields.Date() + ebics_config_ids = fields.Many2many( + comodel_name="ebics.config", string="EBICS Configurations" + ) + log_ids = fields.One2many( + comodel_name="ebics.batch.log.item", + inverse_name="log_id", + string="Batch Import Log Items", + readonly=True, + ) + file_ids = fields.Many2many( + comodel_name="ebics.file", + string="Batch Import EBICS Files", + readonly=True, + ) + file_count = fields.Integer( + string="EBICS Files Count", compute="_compute_ebics_files_fields", readonly=True + ) + has_draft_files = fields.Boolean(compute="_compute_ebics_files_fields") + state = fields.Selection( + selection=[("draft", "Draft"), ("error", "Error"), ("done", "Done")], + required=True, + readonly=True, + default="draft", + ) + + @api.depends("file_ids") + def _compute_ebics_files_fields(self): + for rec in self: + rec.has_draft_files = "draft" in rec.file_ids.mapped("state") + rec.file_count = len(rec.file_ids) + + @api.ondelete(at_uninstall=False) + def _unlink_unless_draft(self): + if any(rec.state != "draft" for rec in self): + raise UserError( + self.env._("Only log objects in state 'draft' can be deleted !") + ) + + def button_draft(self): + self.state = "draft" + + def button_done(self): + self.state = "done" + + def reprocess(self): + import_dict = {"errors": []} + self._ebics_process(import_dict) + self._finalise_processing(import_dict) + + def view_ebics_files(self): + action = self.env["ir.actions.actions"]._for_xml_id( + "account_ebics.ebics_file_action_download" + ) + action["domain"] = [("id", "in", self.file_ids.ids)] + return action + + def _batch_import(self, ebics_config_ids=None, date_from=None, date_to=None): + """ + Call this method from a cron job to automate the EBICS import. + """ + log_model = self.env["ebics.batch.log"] + import_dict = {"errors": []} + 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)], + "date_from": date_from, + "date_to": date_to, + } + ) + ebics_file_ids = [] + for config in configs: + err_msg = self.env._( + "Error while processing EBICS connection '%s' :\n", config.name + ) + if config.state == "draft": + import_dict["errors"].append( + err_msg + + self.env._( + "Please set state to 'Confirm' and " + "Reprocess this EBICS Import Log." + ) + ) + continue + if not any(config.mapped("ebics_userid_ids.ebics_passphrase_store")): + import_dict["errors"].append( + err_msg + + self.env._( + "No EBICS UserID with stored passphrase found.\n" + "You should configure such a UserID for automated downloads." + ) + ) + continue + try: + with self.env.cr.savepoint(): + ebics_file_ids += self._ebics_import( + config, date_from, date_to, import_dict + ) + except UserError as e: + import_dict["errors"].append(err_msg + " ".join(e.args)) + # Each configuration fails alone; reported in the batch log + except Exception: # noqa: BLE001 + tb = "".join(format_exception(*exc_info())) + import_dict["errors"].append(err_msg + tb) + log.file_ids = [(6, 0, ebics_file_ids)] + try: + log._ebics_process(import_dict) + except UserError as e: + import_dict["errors"].append(err_msg + " ".join(e.args)) + # Reported in the batch log with the traceback + except Exception: # noqa: BLE001 + tb = "".join(format_exception(*exc_info())) + import_dict["errors"].append(err_msg + tb) + log._finalise_processing(import_dict) + + def _finalise_processing(self, import_dict): + log_item_model = self.env["ebics.batch.log.item"] + state = (self.has_draft_files and "draft") or "done" + note = "" + error_count = 0 + if import_dict["errors"]: + state = "error" + note = "\n\n".join(import_dict["errors"]) + error_count = len(import_dict["errors"]) + log_item_model.create( + { + "log_id": self.id, + "state": state, + "note": note, + "error_count": error_count, + } + ) + self.state = state + + def _ebics_import(self, config, date_from, date_to, import_dict): + ebics_userids = config.ebics_userid_ids.filtered( + lambda r: r.ebics_passphrase_store + ) + t_userids = ebics_userids.filtered(lambda r: r.signature_class == "T") + ebics_userid = (t_userids and t_userids[0]) or ebics_userids[0] + xfer_wiz = ( + self.env["ebics.xfer"] + .with_context(ebics_download=True) + .create( + { + "ebics_config_id": config.id, + "date_from": date_from, + "date_to": date_to, + } + ) + ) + xfer_wiz._onchange_ebics_config_id() + xfer_wiz.ebics_userid_id = ebics_userid + res = xfer_wiz.ebics_download() + file_ids = res["context"].get("ebics_file_ids", []) + if res["context"]["err_cnt"]: + import_dict["errors"].append(xfer_wiz.note) + return file_ids + + def _ebics_process(self, import_dict): + to_process = self.file_ids.filtered( + lambda r: r.download_process_method and r.state == "draft" + ) + for ebics_file in to_process: + ebics_file.process() + + +class EbicsBatchLogItem(models.Model): + _name = "ebics.batch.log.item" + _description = "Object to store EBICS Batch Import Log Items" + _order = "create_date desc" + + log_id = fields.Many2one( + comodel_name="ebics.batch.log", + string="Batch Object", + ondelete="cascade", + readonly=True, + ) + state = fields.Selection( + selection=[("draft", "Draft"), ("error", "Error"), ("done", "Done")], + required=True, + readonly=True, + ) + note = fields.Text(string="Batch Import Log", readonly=True) + error_count = fields.Integer(string="Number of Errors", required=True, default=0) diff --git a/account_ebics/security/ir.access.csv b/account_ebics/security/ir.access.csv index 297d576..a26068b 100644 --- a/account_ebics/security/ir.access.csv +++ b/account_ebics/security/ir.access.csv @@ -10,6 +10,8 @@ access_ebics_file_user,ebics_file user,ebics.file,account.group_account_invoice, access_ebics_change_passphrase,access_ebics_change_passphrase,ebics.change.passphrase,account_ebics.group_ebics_manager,cru, access_ebics_xfer,access_ebics_xfer,ebics.xfer,account.group_account_invoice,cru, access_ebics_admin_order,access_ebics_admin_order,ebics.admin.order,account_ebics.group_ebics_manager,cru, +access_ebics_batch_log,ebics.batch.log,ebics.batch.log,account.group_account_invoice,crud, +access_ebics_batch_log_item,ebics.batch.log.item,ebics.batch.log.item,account.group_account_invoice,crud, ebics_config_comp_rule,EBICS Configuration model company rule,ebics.config,,crud,"['|', ('company_ids', '=', False), ('company_ids', 'in', company_ids)]" ebics_userid_comp_rule,EBICS UserID model company rule,ebics.userid,,crud,"['|', ('company_ids', '=', False), ('company_ids', 'in', company_ids)]" ebics_file_comp_rule,EBICS File model company rule,ebics.file,,crud,"['|', ('company_ids', '=', False), ('company_ids', 'in', company_ids)]" diff --git a/account_ebics/tests/__init__.py b/account_ebics/tests/__init__.py index 276c594..15e7d82 100644 --- a/account_ebics/tests/__init__.py +++ b/account_ebics/tests/__init__.py @@ -5,3 +5,4 @@ from . import test_ebics_file_split from . import test_ebics_userid from . import test_ebics_xfer from . import test_ebics_xfer_client +from . import test_ebics_batch_import diff --git a/account_ebics/tests/test_ebics_batch_import.py b/account_ebics/tests/test_ebics_batch_import.py new file mode 100644 index 0000000..df2fbcd --- /dev/null +++ b/account_ebics/tests/test_ebics_batch_import.py @@ -0,0 +1,95 @@ +# Copyright 2026 Noviat. +# License LGPL-3 or later (https://www.gnu.org/licenses/lgpl). + +from unittest.mock import patch + +from fintech.ebics import EbicsTechnicalError + +from odoo.exceptions import UserError +from odoo.tests import tagged + +from odoo.addons.account_ebics.tests.common import ( + EbicsTestCommon, + FakeEbicsClient, + read_sample, +) + + +@tagged("post_install", "-at_install") +class TestEbicsBatchImport(EbicsTestCommon): + @classmethod + def setUpClass(cls): + super().setUpClass() + # A format without processing method: files are stored as done. + cls.ff_ptk = cls.env["ebics.file.format"].create( + {"name": "PTK", "type": "down", "order_type": "PTK", "suffix": "txt"} + ) + cls.ebics_config.ebics_file_format_ids = cls.ff_ptk + cls.log_model = cls.env["ebics.batch.log"] + + def _run(self, client, **kwargs): + with self._fake_client(client): + self.log_model._batch_import( + ebics_config_ids=self.ebics_config.ids, **kwargs + ) + return self.log_model.search([], order="id desc", limit=1) + + def test_import(self): + client = FakeEbicsClient(downloads={"PTK": read_sample("ptk_protocol.txt")}) + log = self._run(client, date_from="2026-10-12", date_to="2026-10-13") + self.assertEqual(log.state, "done") + self.assertEqual(log.ebics_config_ids, self.ebics_config) + self.assertEqual(log.file_count, 1) + self.assertEqual(log.file_ids.name, "TESTHOST_PARTNER1_2026-10-13.txt") + self.assertEqual(log.log_ids.state, "done") + self.assertEqual(log.log_ids.error_count, 0) + + def test_import_prefers_transport_signature_user(self): + """Downloads need no signature right: a class T user is preferred.""" + self.ebics_userid.signature_class = "E" + transport_userid = self.ebics_userid.copy( + {"name": "USER2", "signature_class": "T", "state": "active_keys"} + ) + client = FakeEbicsClient(downloads={"PTK": read_sample("ptk_protocol.txt")}) + log = self._run(client, date_to="2026-10-13") + self.assertEqual(log.file_ids.ebics_userid_id, transport_userid) + + def test_import_transfer_error(self): + error = EbicsTechnicalError("061001", "EBICS_AUTHENTICATION_FAILED") + log = self._run(FakeEbicsClient(error=error)) + self.assertEqual(log.state, "error") + self.assertFalse(log.file_ids) + self.assertEqual(log.log_ids.error_count, 1) + self.assertIn("EBICS_AUTHENTICATION_FAILED", log.log_ids.note) + + def test_import_draft_config(self): + self.ebics_config.set_to_draft() + log = self._run(FakeEbicsClient()) + self.assertEqual(log.state, "error") + self.assertIn("Please set state to 'Confirm'", log.log_ids.note) + + def test_import_without_stored_passphrase(self): + self.ebics_userid.ebics_passphrase_store = False + log = self._run(FakeEbicsClient()) + self.assertEqual(log.state, "error") + self.assertIn("No EBICS UserID with stored passphrase", log.log_ids.note) + + def test_draft_files_are_processed_and_reprocessed(self): + ebics_file = self._create_ebics_file("camt053_sparkasse.xml", self.ff_camt053) + log = self.log_model.create({"file_ids": [(6, 0, ebics_file.ids)]}) + self.assertTrue(log.has_draft_files) + file_class = type(ebics_file) + with patch.object(file_class, "process", autospec=True) as process: + log.reprocess() + process.assert_called_once_with(ebics_file) + # the file is still draft since processing was mocked + self.assertEqual(log.state, "draft") + + def test_unlink_only_draft_logs(self): + log = self.log_model.create({}) + log.button_done() + with self.assertRaises(UserError): + log.unlink() + log.button_draft() + log.unlink() + self.assertFalse(log.exists()) diff --git a/account_ebics/views/ebics_batch_log_views.xml b/account_ebics/views/ebics_batch_log_views.xml new file mode 100644 index 0000000..198f722 --- /dev/null +++ b/account_ebics/views/ebics_batch_log_views.xml @@ -0,0 +1,128 @@ + + + + ebics.batch.log.search + ebics.batch.log + + + + + + + + + + + + + + + + ebics.batch.log.list + ebics.batch.log + + + + + + + + + + + ebics.batch.log.form + ebics.batch.log + +
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + + EBICS Batch Import Logs + ir.actions.act_window + ebics.batch.log + list,form + + + +
diff --git a/account_ebics/views/menu.xml b/account_ebics/views/menu.xml index 2f84714..07326a0 100644 --- a/account_ebics/views/menu.xml +++ b/account_ebics/views/menu.xml @@ -46,6 +46,14 @@ sequence="30" /> + +