From 69a69cc7e5d14adf35c245a4ab495b8adeca011e Mon Sep 17 00:00:00 2001 From: evgeny-l Date: Wed, 21 Jun 2023 13:37:11 +0200 Subject: [PATCH 1/4] [FIX] account_ebics: minor typos --- account_ebics/README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/account_ebics/README.rst b/account_ebics/README.rst index bb9f14d..dafe4b1 100644 --- a/account_ebics/README.rst +++ b/account_ebics/README.rst @@ -167,7 +167,7 @@ Most commonly used formats for which support is available in Odoo should be ther Please open an issue on https://github.com/Noviat/account_ebics to report missing EBICS File Formats. -For File Formats of type 'Downloads' you can also specifiy a 'Download Process Method'. +For File Formats of type 'Downloads' you can also specify a 'Download Process Method'. This is the method that will be executed when hitting the 'Process' button on the downloaded file. @@ -205,7 +205,7 @@ During the processing of your EBICS upload/download, your bank may return an Err EBICS Functional Error: EBICS_NO_DOWNLOAD_DATA_AVAILABLE (code: 90005) -A detailled explanation of the codes can be found on http://www.ebics.org. +A detailed explanation of the codes can be found on http://www.ebics.org. You can also find this information in the doc folder of this module (file EBICS_Annex1_ReturnCodes). | @@ -213,7 +213,7 @@ You can also find this information in the doc folder of this module (file EBICS_ Known Issues / Roadmap ====================== -- add support to import externally generated keys & certificates (currently only 3SKey signature certificate). +- Add support to import externally generated keys & certificates (currently only 3SKey signature certificate). - For Odoo 16.0 the interaction with the OCA payment order and bank statement import modules (e.g. french CFONB) is not yet available. - Electronic Distributed Signature (EDS) is not supported in the current version of this module. From 08d572b9dfe2cca3c1d136b7b2e21dc3be2ffd22 Mon Sep 17 00:00:00 2001 From: evgeny-l Date: Wed, 21 Jun 2023 13:34:37 +0200 Subject: [PATCH 2/4] [IMP] account_ebics: correct support of ebics.userid.user_ids filter, ebics-key UI designation improvement --- account_ebics/__manifest__.py | 2 +- account_ebics/models/ebics_userid.py | 11 +++++ account_ebics/views/ebics_userid_views.xml | 1 + account_ebics/wizards/ebics_xfer.py | 49 +++++++++++++--------- account_ebics/wizards/ebics_xfer.xml | 8 ++-- 5 files changed, 47 insertions(+), 24 deletions(-) diff --git a/account_ebics/__manifest__.py b/account_ebics/__manifest__.py index 4afd992..4d56d8f 100644 --- a/account_ebics/__manifest__.py +++ b/account_ebics/__manifest__.py @@ -3,7 +3,7 @@ { "name": "EBICS banking protocol", - "version": "16.0.1.2.0", + "version": "16.0.1.3.0", "license": "LGPL-3", "author": "Noviat", "website": "https://www.noviat.com", diff --git a/account_ebics/models/ebics_userid.py b/account_ebics/models/ebics_userid.py index 9ed6f93..f60b04c 100644 --- a/account_ebics/models/ebics_userid.py +++ b/account_ebics/models/ebics_userid.py @@ -84,6 +84,17 @@ class EbicsUserID(models.Model): "This default can be overriden for specific " "EBICS transactions (cf. File Formats).", ) + ui_designation = fields.Selection( + [ + ("both", "Download and Upload"), + ("down", "Download Only"), + ("up", "Upload Only"), + ], + string="UI Designation", + default="both", + required=True, + help="Defines in what form this User will be available for selection.", + ) ebics_keys_fn = fields.Char(compute="_compute_ebics_keys_fn") ebics_keys_found = fields.Boolean(compute="_compute_ebics_keys_found") ebics_passphrase = fields.Char(string="EBICS Passphrase") diff --git a/account_ebics/views/ebics_userid_views.xml b/account_ebics/views/ebics_userid_views.xml index c174db2..22f46b6 100644 --- a/account_ebics/views/ebics_userid_views.xml +++ b/account_ebics/views/ebics_userid_views.xml @@ -95,6 +95,7 @@ /> + diff --git a/account_ebics/wizards/ebics_xfer.py b/account_ebics/wizards/ebics_xfer.py index 2332164..4d68825 100644 --- a/account_ebics/wizards/ebics_xfer.py +++ b/account_ebics/wizards/ebics_xfer.py @@ -113,29 +113,40 @@ class EbicsXfer(models.TransientModel): @api.onchange("ebics_config_id") def _onchange_ebics_config_id(self): - ebics_userids = self.ebics_config_id.ebics_userid_ids - if self.env.context.get("ebics_download"): - download_formats = self.ebics_config_id.ebics_file_format_ids.filtered( + avail_userids = self.ebics_config_id.ebics_userid_ids.filtered( + lambda r: self.env.user.id in r.user_ids.ids + ) + + if self.env.context.get("ebics_download"): # Download Form + avail_formats = self.ebics_config_id.ebics_file_format_ids.filtered( lambda r: r.type == "down" ) - if len(download_formats) == 1: - self.format_id = download_formats - if len(ebics_userids) == 1: - self.ebics_userid_id = ebics_userids - else: - transport_users = ebics_userids.filtered( - lambda r: r.signature_class == "T" - ) - if len(transport_users) == 1: - self.ebics_userid_id = transport_users - else: - upload_formats = self.ebics_config_id.ebics_file_format_ids.filtered( + avail_userids = avail_userids.filtered( + lambda r: r.ui_designation in ["both", 'down'] + ) + else: # Upload Form + avail_formats = self.ebics_config_id.ebics_file_format_ids.filtered( lambda r: r.type == "up" ) - if len(upload_formats) == 1: - self.format_id = upload_formats - if len(ebics_userids) == 1: - self.ebics_userid_id = ebics_userids + avail_userids = avail_userids.filtered( + lambda r: r.ui_designation in ["both", "up"] + ) + + if avail_formats and len(avail_formats) == 1: + self.format_id = avail_formats + else: + self.format_id = False + if avail_userids: + if len(avail_userids) == 1: + self.ebics_userid_id = avail_userids + else: + with_passphrs_userids = avail_userids.filtered( + lambda r: r.ebics_passphrase_store + ) + if len(with_passphrs_userids) == 1: + self.ebics_userid_id = with_passphrs_userids + else: + self.ebics_userid_id = False @api.onchange("upload_data") def _onchange_upload_data(self): diff --git a/account_ebics/wizards/ebics_xfer.xml b/account_ebics/wizards/ebics_xfer.xml index 5439285..3f691de 100644 --- a/account_ebics/wizards/ebics_xfer.xml +++ b/account_ebics/wizards/ebics_xfer.xml @@ -16,7 +16,7 @@ /> @@ -69,7 +69,7 @@ /> @@ -143,7 +143,7 @@ - EBICS File Transfer + EBICS File Transfer - Download ir.actions.act_window ebics.xfer form @@ -153,7 +153,7 @@ - EBICS File Transfer + EBICS File Transfer - Upload ir.actions.act_window ebics.xfer form From 1638aae5ca2b41ca0eac7470ca487a3defc0c445 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Sun, 25 Jun 2023 17:04:49 +0200 Subject: [PATCH 3/4] rename ui_designation to transaction_rights --- account_ebics/models/ebics_userid.py | 9 +++++---- account_ebics/views/ebics_userid_views.xml | 2 +- account_ebics/wizards/ebics_xfer.py | 4 ++-- account_ebics/wizards/ebics_xfer.xml | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/account_ebics/models/ebics_userid.py b/account_ebics/models/ebics_userid.py index f60b04c..2e1cfb3 100644 --- a/account_ebics/models/ebics_userid.py +++ b/account_ebics/models/ebics_userid.py @@ -84,16 +84,17 @@ class EbicsUserID(models.Model): "This default can be overriden for specific " "EBICS transactions (cf. File Formats).", ) - ui_designation = fields.Selection( - [ + transaction_rights = fields.Selection( + selection=[ ("both", "Download and Upload"), ("down", "Download Only"), ("up", "Upload Only"), ], - string="UI Designation", + string="Allowed Transactions", default="both", required=True, - help="Defines in what form this User will be available for selection.", + help="Use this parameter to limit the transactions for this User " + "to downloads or uploads.", ) ebics_keys_fn = fields.Char(compute="_compute_ebics_keys_fn") ebics_keys_found = fields.Boolean(compute="_compute_ebics_keys_found") diff --git a/account_ebics/views/ebics_userid_views.xml b/account_ebics/views/ebics_userid_views.xml index 22f46b6..afe3088 100644 --- a/account_ebics/views/ebics_userid_views.xml +++ b/account_ebics/views/ebics_userid_views.xml @@ -94,8 +94,8 @@ attrs="{'required': [('ebics_passphrase_store', '=', True)], 'invisible': [('state', '!=', 'draft')]}" /> + - diff --git a/account_ebics/wizards/ebics_xfer.py b/account_ebics/wizards/ebics_xfer.py index 4d68825..44a5504 100644 --- a/account_ebics/wizards/ebics_xfer.py +++ b/account_ebics/wizards/ebics_xfer.py @@ -122,14 +122,14 @@ class EbicsXfer(models.TransientModel): lambda r: r.type == "down" ) avail_userids = avail_userids.filtered( - lambda r: r.ui_designation in ["both", 'down'] + lambda r: r.transaction_rights in ["both", "down"] ) else: # Upload Form avail_formats = self.ebics_config_id.ebics_file_format_ids.filtered( lambda r: r.type == "up" ) avail_userids = avail_userids.filtered( - lambda r: r.ui_designation in ["both", "up"] + lambda r: r.transaction_rights in ["both", "up"] ) if avail_formats and len(avail_formats) == 1: diff --git a/account_ebics/wizards/ebics_xfer.xml b/account_ebics/wizards/ebics_xfer.xml index 3f691de..9cb67fb 100644 --- a/account_ebics/wizards/ebics_xfer.xml +++ b/account_ebics/wizards/ebics_xfer.xml @@ -16,7 +16,7 @@ /> @@ -69,7 +69,7 @@ /> From f95be42ad209ecf708d35a70fb6897e4ef9bd956 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Sun, 25 Jun 2023 20:05:33 +0200 Subject: [PATCH 4/4] [16.0]update index.html --- account_ebics/static/description/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/account_ebics/static/description/index.html b/account_ebics/static/description/index.html index b9815df..9ed5115 100644 --- a/account_ebics/static/description/index.html +++ b/account_ebics/static/description/index.html @@ -521,7 +521,7 @@ fintech_register_users = USER1, USER2

Check if the EBICS File formats that you want to process in Odoo are defined.

Most commonly used formats for which support is available in Odoo should be there already.

Please open an issue on https://github.com/Noviat/account_ebics to report missing EBICS File Formats.

-

For File Formats of type 'Downloads' you can also specifiy a 'Download Process Method'.

+

For File Formats of type 'Downloads' you can also specify a 'Download Process Method'.

This is the method that will be executed when hitting the 'Process' button on the downloaded file.

The following methods are currently available:

    @@ -552,7 +552,7 @@ fintech_register_users = USER1, USER2

    During the processing of your EBICS upload/download, your bank may return an Error Code, e.g.

    EBICS Functional Error: EBICS_NO_DOWNLOAD_DATA_AVAILABLE (code: 90005)

    -

    A detailled explanation of the codes can be found on http://www.ebics.org. +

    A detailed explanation of the codes can be found on http://www.ebics.org. You can also find this information in the doc folder of this module (file EBICS_Annex1_ReturnCodes).


    @@ -562,7 +562,7 @@ You can also find this information in the doc folder of this module (file EBICS_

    Known Issues / Roadmap

      -
    • add support to import externally generated keys & certificates (currently only 3SKey signature certificate).
    • +
    • Add support to import externally generated keys & certificates (currently only 3SKey signature certificate).
    • For Odoo 16.0 the interaction with the OCA payment order and bank statement import modules (e.g. french CFONB) is not yet available.
    • Electronic Distributed Signature (EDS) is not supported in the current version of this module.