diff --git a/account_ebics/__manifest__.py b/account_ebics/__manifest__.py index ca96480..34842bc 100644 --- a/account_ebics/__manifest__.py +++ b/account_ebics/__manifest__.py @@ -1,4 +1,4 @@ -# Copyright 2009-2024 Noviat. +# Copyright 2009-2025 Noviat. # License LGPL-3 or later (http://www.gnu.org/licenses/lgpl). { 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' " diff --git a/account_ebics/migrations/17.0.1.2/post-migration.py b/account_ebics/migrations/17.0.1.2/post-migration.py new file mode 100644 index 0000000..2c5b89e --- /dev/null +++ b/account_ebics/migrations/17.0.1.2/post-migration.py @@ -0,0 +1,15 @@ +# Copyright 2009-2025 Noviat. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +def migrate(cr, version): + cr.execute( # pylint: disable=E8103 + """ + UPDATE ebics_file ef + SET state = 'done' + FROM ebics_file_format eff + WHERE ef.format_id = eff.id + AND eff.type = 'down' + AND eff.download_process_method IS NULL; + """ + ) diff --git a/account_ebics/models/ebics_file.py b/account_ebics/models/ebics_file.py index cc5dd45..a63f2df 100644 --- a/account_ebics/models/ebics_file.py +++ b/account_ebics/models/ebics_file.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 @@ -36,7 +36,10 @@ class EbicsFile(models.Model): format_id = fields.Many2one( comodel_name="ebics.file.format", string="EBICS File Formats", readonly=True ) - type = fields.Selection(related="format_id.type", readonly=True) + download_process_method = fields.Selection( + related="format_id.download_process_method" + ) + type = fields.Selection(related="format_id.type") date_from = fields.Date( readonly=True, help="'Date From' as entered in the download wizard." ) @@ -306,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/security/ebics_security.xml b/account_ebics/security/ebics_security.xml index 7b11eac..27d55f5 100644 --- a/account_ebics/security/ebics_security.xml +++ b/account_ebics/security/ebics_security.xml @@ -1,40 +1,40 @@ - - EBICS Manager - - - - - - - EBICS Configuration model company rule - - - ['|', ('company_ids', '=', False), ('company_ids', 'in', user.company_ids.ids)] + + EBICS Manager + - - EBICS UserID model company rule - - - + + + EBICS Configuration model company rule + + + ['|', ('company_ids', '=', False), ('company_ids', 'in', user.company_ids.ids)] - + - - EBICS File model company rule - - - + EBICS UserID model company rule + + + ['|', ('company_ids', '=', False), ('company_ids', 'in', user.company_ids.ids)] - + - + + EBICS File model company rule + + + ['|', ('company_ids', '=', False), ('company_ids', 'in', user.company_ids.ids)] + + + diff --git a/account_ebics/views/ebics_config_views.xml b/account_ebics/views/ebics_config_views.xml index 7f15850..1f04222 100644 --- a/account_ebics/views/ebics_config_views.xml +++ b/account_ebics/views/ebics_config_views.xml @@ -1,26 +1,26 @@ - + - - ebics.config.list - ebics.config - - - - - - - - - + + ebics.config.list + ebics.config + + + + + + + + + - - ebics.config.form - ebics.config - -
-
-
- + + - - - - - - - - - - + + + + + + + + + - - - - + + + - - - - - - - - - - - -
-
+ + + + + + + + + + + + + - - EBICS Configuration - ebics.config - list,form - {'active_test': False} - + + EBICS Configuration + ebics.config + list,form + {'active_test': False} +
diff --git a/account_ebics/views/ebics_file_format_views.xml b/account_ebics/views/ebics_file_format_views.xml index 7699a69..4f5e5e3 100644 --- a/account_ebics/views/ebics_file_format_views.xml +++ b/account_ebics/views/ebics_file_format_views.xml @@ -1,74 +1,74 @@ - + - - ebics.file.format.list - ebics.file.format - - - - - - - - - - - + + ebics.file.format.list + ebics.file.format + + + + + + + + + + + - - ebics.file.format.form - ebics.file.format - -
- - - - - - + ebics.file.format.form + ebics.file.format + + + + + + + + - - - - - + + + + - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + - - EBICS File Formats - ebics.file.format - list,form - + + EBICS File Formats + ebics.file.format + list,form +
diff --git a/account_ebics/views/ebics_file_views.xml b/account_ebics/views/ebics_file_views.xml index 465ccbb..ebdda59 100644 --- a/account_ebics/views/ebics_file_views.xml +++ b/account_ebics/views/ebics_file_views.xml @@ -1,253 +1,281 @@ - + - - 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_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 456df24..562812c 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 @@ -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, @@ -612,6 +610,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() 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,