From 49c764d7d4db163b787206046fa7104d678a3017 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Fri, 3 Jan 2025 14:28:50 +0100 Subject: [PATCH 1/5] [IMP] account_ebics: add draft, done filters on ebics.file search view --- account_ebics/views/ebics_file_views.xml | 375 ++++++++++++----------- 1 file changed, 198 insertions(+), 177 deletions(-) diff --git a/account_ebics/views/ebics_file_views.xml b/account_ebics/views/ebics_file_views.xml index 465ccbb..3189e67 100644 --- a/account_ebics/views/ebics_file_views.xml +++ b/account_ebics/views/ebics_file_views.xml @@ -1,75 +1,90 @@ - - ebics.file.search - ebics.file - - - - - - - - - - - - - + ebics.file.search + ebics.file + + + + + + + + + + + + - - - - - - + + + + + + - + - - ebics.file.list - ebics.file - - - - - - - - - - + ebics.file.list + ebics.file + + + + + + + + + + - - - + + + - - ebics.file.form - ebics.file - 1 - -
-
-
- - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - -
+ + + + + + + + + + + + - - ebics.file.process.result - ebics.file - 2 - -
- - -
-
- -
-
+ - - + + EBICS Administrative Order + ebics.admin.order + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + + + + + - - EBICS Administrative Order result - ebics.admin.order - 2 - -
- - -
-
- -
-
+ + + + - - EBICS Administrative Order - ir.actions.act_window - ebics.admin.order - form - new - - + + EBICS Administrative Order + ir.actions.act_window + ebics.admin.order + form + new + +
diff --git a/account_ebics/wizards/ebics_xfer.py b/account_ebics/wizards/ebics_xfer.py index 456df24..88f61f7 100644 --- a/account_ebics/wizards/ebics_xfer.py +++ b/account_ebics/wizards/ebics_xfer.py @@ -1,4 +1,4 @@ -# Copyright 2009-2024 Noviat. +# Copyright 2009-2025 Noviat. # License LGPL-3 or later (http://www.gnu.org/licenses/lgpl). import base64 @@ -612,6 +612,7 @@ class EbicsXfer(models.TransientModel): "date_from": self.date_from, "date_to": self.date_to, "format_id": file_format.id, + "state": file_format.download_process_method and "draft" or "done", "user_id": self._uid, "ebics_userid_id": self.ebics_userid_id.id, "company_ids": self.ebics_config_id.company_ids.ids, diff --git a/account_ebics/wizards/ebics_xfer.xml b/account_ebics/wizards/ebics_xfer.xml index f763894..0779331 100644 --- a/account_ebics/wizards/ebics_xfer.xml +++ b/account_ebics/wizards/ebics_xfer.xml @@ -1,130 +1,133 @@ - - EBICS File Download - ebics.xfer - 1 - -
- - - + EBICS File Download + ebics.xfer + 1 + + + + + - - - - - + + - - -
-
- -
-
+ + + + - - EBICS File Upload - ebics.xfer - 1 - -
- - - + EBICS File Upload + ebics.xfer + 1 + + + + + - - - - - - - - + + + + - - - -
-
- -
-
+ + + + - - EBICS File Transfer - ebics.xfer - 2 - -
- - -
-
- -
-
+ + + + - - EBICS File Transfer - Download - ir.actions.act_window - ebics.xfer - form - new - {'ebics_download': 1} - - + + EBICS File Transfer - Download + ir.actions.act_window + ebics.xfer + form + new + {'ebics_download': 1} + + - - EBICS File Transfer - Upload - ir.actions.act_window - ebics.xfer - form - new - {'ebics_upload': 1} - - + + EBICS File Transfer - Upload + ir.actions.act_window + ebics.xfer + form + new + {'ebics_upload': 1} + +
diff --git a/account_ebics_batch/__manifest__.py b/account_ebics_batch/__manifest__.py index 86060ca..5acfef6 100644 --- a/account_ebics_batch/__manifest__.py +++ b/account_ebics_batch/__manifest__.py @@ -1,4 +1,4 @@ -# Copyright 2009-2024 Noviat. +# Copyright 2009-2025 Noviat. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { diff --git a/account_ebics_batch/models/ebics_batch_log.py b/account_ebics_batch/models/ebics_batch_log.py index 8600a40..93a2ed9 100644 --- a/account_ebics_batch/models/ebics_batch_log.py +++ b/account_ebics_batch/models/ebics_batch_log.py @@ -182,7 +182,9 @@ class EbicsBatchLog(models.Model): return file_ids def _ebics_process(self, import_dict): - to_process = self.file_ids.filtered(lambda r: r.state == "draft") + 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() From fb1a9f5344d04106aa9cfd70eef2ece5944e6987 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 4 Jan 2025 16:16:26 +0000 Subject: [PATCH 3/5] [UPD] Update account_ebics.pot --- account_ebics/i18n/account_ebics.pot | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/account_ebics/i18n/account_ebics.pot b/account_ebics/i18n/account_ebics.pot index d86e380..1d1f026 100644 --- a/account_ebics/i18n/account_ebics.pot +++ b/account_ebics/i18n/account_ebics.pot @@ -323,6 +323,7 @@ msgstr "" #. module: account_ebics #: 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" msgstr "" @@ -355,6 +356,7 @@ msgid "Download Only" msgstr "" #. module: account_ebics +#: model:ir.model.fields,field_description:account_ebics.field_ebics_file__download_process_method #: model:ir.model.fields,field_description:account_ebics.field_ebics_file_format__download_process_method msgid "Download Process Method" msgstr "" @@ -368,6 +370,7 @@ msgstr "" #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_config__state__draft #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_file__state__draft #: model:ir.model.fields.selection,name:account_ebics.selection__ebics_userid__state__draft +#: model_terms:ir.ui.view,arch_db:account_ebics.ebics_file_view_search msgid "Draft" msgstr "" @@ -819,6 +822,7 @@ msgid "Enable 3SKey support" msgstr "" #. module: account_ebics +#: model:ir.model.fields,help:account_ebics.field_ebics_file__download_process_method #: model:ir.model.fields,help:account_ebics.field_ebics_file_format__download_process_method msgid "" "Enable processing within Odoo of the downloaded file via the 'Process' " From 6f3da9cf8c6d85a146dbbf75411b6176733b0192 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Sat, 4 Jan 2025 17:23:43 +0100 Subject: [PATCH 4/5] [FIX] account_ebics : fix ebics.file 'Done' filter --- account_ebics/views/ebics_file_views.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/account_ebics/views/ebics_file_views.xml b/account_ebics/views/ebics_file_views.xml index 92ee4e9..ebdda59 100644 --- a/account_ebics/views/ebics_file_views.xml +++ b/account_ebics/views/ebics_file_views.xml @@ -21,11 +21,7 @@ name="draft" domain="[('state', '=', 'draft')]" /> - + Date: Sat, 4 Jan 2025 17:44:38 +0100 Subject: [PATCH 5/5] [IMP] account_ebics : remove obsolete 'view_type' in actions --- account_ebics/models/ebics_file.py | 1 - account_ebics/models/ebics_userid.py | 1 - account_ebics/wizards/ebics_admin_order.py | 1 - account_ebics/wizards/ebics_change_passphrase.py | 1 - account_ebics/wizards/ebics_xfer.py | 2 -- account_ebics_batch_payment/models/account_batch_payment.py | 1 - 6 files changed, 7 deletions(-) diff --git a/account_ebics/models/ebics_file.py b/account_ebics/models/ebics_file.py index 5d2e647..a63f2df 100644 --- a/account_ebics/models/ebics_file.py +++ b/account_ebics/models/ebics_file.py @@ -309,7 +309,6 @@ class EbicsFile(models.Model): return { "name": self.env._("Import EBICS File"), "res_id": self.id, - "view_type": "form", "view_mode": "form", "res_model": self._name, "view_id": result_view.id, diff --git a/account_ebics/models/ebics_userid.py b/account_ebics/models/ebics_userid.py index bba605b..2172f3a 100644 --- a/account_ebics/models/ebics_userid.py +++ b/account_ebics/models/ebics_userid.py @@ -587,7 +587,6 @@ class EbicsUserID(models.Model): view = self.env.ref("%s.ebics_change_passphrase_view_form" % module) return { "name": self.env._("EBICS keys change passphrase"), - "view_type": "form", "view_mode": "form", "res_model": "ebics.change.passphrase", "view_id": view.id, diff --git a/account_ebics/wizards/ebics_admin_order.py b/account_ebics/wizards/ebics_admin_order.py index 0825491..c20192b 100644 --- a/account_ebics/wizards/ebics_admin_order.py +++ b/account_ebics/wizards/ebics_admin_order.py @@ -42,7 +42,6 @@ class EbicsAdminOrder(models.TransientModel): return { "name": self.env._("EBICS Administrative Order result"), "res_id": self.id, - "view_type": "form", "view_mode": "form", "res_model": "ebics.admin.order", "view_id": result_view.id, diff --git a/account_ebics/wizards/ebics_change_passphrase.py b/account_ebics/wizards/ebics_change_passphrase.py index 728dd0c..94be2c1 100644 --- a/account_ebics/wizards/ebics_change_passphrase.py +++ b/account_ebics/wizards/ebics_change_passphrase.py @@ -109,7 +109,6 @@ class EbicsChangePassphrase(models.TransientModel): return { "name": self.env._("EBICS Keys Change Passphrase"), "res_id": self.id, - "view_type": "form", "view_mode": "form", "res_model": "ebics.change.passphrase", "view_id": result_view.id, diff --git a/account_ebics/wizards/ebics_xfer.py b/account_ebics/wizards/ebics_xfer.py index 88f61f7..562812c 100644 --- a/account_ebics/wizards/ebics_xfer.py +++ b/account_ebics/wizards/ebics_xfer.py @@ -205,7 +205,6 @@ class EbicsXfer(models.TransientModel): return { "name": self.env._("EBICS file transfer result"), "res_id": self.id, - "view_type": "form", "view_mode": "form", "res_model": "ebics.xfer", "view_id": result_view.id, @@ -347,7 +346,6 @@ class EbicsXfer(models.TransientModel): return { "name": self.env._("EBICS file transfer result"), "res_id": self.id, - "view_type": "form", "view_mode": "form", "res_model": "ebics.xfer", "view_id": result_view.id, diff --git a/account_ebics_batch_payment/models/account_batch_payment.py b/account_ebics_batch_payment/models/account_batch_payment.py index dbb4ae6..fc98660 100644 --- a/account_ebics_batch_payment/models/account_batch_payment.py +++ b/account_ebics_batch_payment/models/account_batch_payment.py @@ -46,7 +46,6 @@ class AccountBatchPayment(models.Model): view = self.env.ref("account_ebics.ebics_xfer_view_form_upload") act = { "name": self.env._("EBICS Upload"), - "view_type": "form", "view_mode": "form", "res_model": "ebics.xfer", "view_id": view.id,