From a2e012fe23e2628ff5633a0978cf2b56982be57a Mon Sep 17 00:00:00 2001 From: Arnau Date: Tue, 13 Jan 2026 15:37:24 +0100 Subject: [PATCH 001/145] [FIX] edi_storage_oca: ls whitespace filename with ftp protocol --- edi_storage_oca/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/edi_storage_oca/utils.py b/edi_storage_oca/utils.py index 0b93e5da0..0b791c09b 100644 --- a/edi_storage_oca/utils.py +++ b/edi_storage_oca/utils.py @@ -48,6 +48,8 @@ def list_files(storage, relative_path="", pattern=False): if pattern: relative_path = fs.sep.join([relative_path, pattern]) return fs.glob(relative_path) + if fs.protocol == "ftp" and fs.ftp: + return fs.ftp.nlst(relative_path) return fs.ls(relative_path, detail=False) From adbd73abe83c4712dae2f7a34129f63dbaf580d8 Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Tue, 20 Jan 2026 17:35:55 +0100 Subject: [PATCH 002/145] edi_core: clarify quick exec usage Ignore quick_exec types when running automated actions via cron. We assume that quick exec records will be executed right away. You still have the possibility to enforce this using edi__force_generate ctx key. At the same time, make the usage more clear in the UI: quick exec is available only if you want to generate the output automatically. --- edi_core_oca/models/edi_backend.py | 9 ++++++ edi_core_oca/models/edi_exchange_record.py | 5 ++-- edi_core_oca/models/edi_exchange_type.py | 4 ++- edi_core_oca/tests/test_edi_backend_cron.py | 30 ++++++++++++++----- .../views/edi_exchange_type_views.xml | 10 +++++-- 5 files changed, 45 insertions(+), 13 deletions(-) diff --git a/edi_core_oca/models/edi_backend.py b/edi_core_oca/models/edi_backend.py index bdea2e24f..47d9c3db7 100644 --- a/edi_core_oca/models/edi_backend.py +++ b/edi_core_oca/models/edi_backend.py @@ -373,6 +373,15 @@ def _output_new_records_domain(self, record_ids=None): ] if record_ids: domain.append(("id", "in", record_ids)) + # By default, it's pointless to consider records with quick_exec + # because they will be executed right away when created. + domain.append( + ( + "type_id.quick_exec", + "=", + self.env.context.get("edi__quick_exec", False), + ) + ) return domain def _output_pending_records_domain(self, skip_sent=True, record_ids=None): diff --git a/edi_core_oca/models/edi_exchange_record.py b/edi_core_oca/models/edi_exchange_record.py index 8e4f697ed..8e24a5e9e 100644 --- a/edi_core_oca/models/edi_exchange_record.py +++ b/edi_core_oca/models/edi_exchange_record.py @@ -379,10 +379,11 @@ def _execute_next_action(self): # The backend already knows how to handle records # according to their direction and status. # Let it decide. + backend = self.backend_id.with_context(edi__quick_exec=True) if self.type_id.direction == "output": - self.backend_id._check_output_exchange_sync(record_ids=self.ids) + backend._check_output_exchange_sync(record_ids=self.ids) else: - self.backend_id._check_input_exchange_sync(record_ids=self.ids) + backend._check_input_exchange_sync(record_ids=self.ids) @api.constrains("backend_id", "type_id") def _constrain_backend(self): diff --git a/edi_core_oca/models/edi_exchange_type.py b/edi_core_oca/models/edi_exchange_type.py index 3abe5848f..5850cf356 100644 --- a/edi_core_oca/models/edi_exchange_type.py +++ b/edi_core_oca/models/edi_exchange_type.py @@ -155,7 +155,9 @@ class EDIExchangeType(models.Model): quick_exec = fields.Boolean( string="Quick execution", help="When active, records of this type will be processed immediately " - "without waiting for the cron to pass by.", + "without waiting for the cron to pass by. " + "Requires auto generate flag to be active as well. " + "The cron will skip these records unless forced.", ) partner_ids = fields.Many2many( string="Enabled for partners", diff --git a/edi_core_oca/tests/test_edi_backend_cron.py b/edi_core_oca/tests/test_edi_backend_cron.py index db227b5ad..37d3911bd 100644 --- a/edi_core_oca/tests/test_edi_backend_cron.py +++ b/edi_core_oca/tests/test_edi_backend_cron.py @@ -87,14 +87,8 @@ def test_exchange_generate_new_auto_skip_send(self): # TODO: test better? self.assertFalse(rec.ack_exchange_id) - @mute_logger(*LOGGERS) - def test_exchange_generate_new_auto_send(self): - self.exchange_type_out.exchange_file_auto_generate = True - # No content ready to be sent, will get the content and send it - for rec in self.records: - self.assertEqual(rec.edi_exchange_state, "new") - self.backend._cron_check_output_exchange_sync() - for rec in self.records: + def _test_generate_new_auto_send(self, records): + for rec in records: self.assertEqual(rec.edi_exchange_state, "output_sent") self.assertTrue( self.ExecutionAbstractModel.check_called_for(rec, "generate") @@ -104,6 +98,26 @@ def test_exchange_generate_new_auto_send(self): ) self.assertTrue(self.ExecutionAbstractModel.check_called_for(rec, "send")) + @mute_logger(*LOGGERS) + def test_exchange_generate_new_auto_send(self): + self.exchange_type_out.exchange_file_auto_generate = True + # No content ready to be sent, will get the content and send it + for rec in self.records: + self.assertEqual(rec.edi_exchange_state, "new") + self.backend._cron_check_output_exchange_sync() + self._test_generate_new_auto_send(self.records) + + @mute_logger(*LOGGERS) + def test_exchange_generate_new_quick_exec_skip_cron(self): + self.exchange_type_out.exchange_file_auto_generate = True + self.exchange_type_out.quick_exec = True + for rec in self.records: + self.assertEqual(rec.edi_exchange_state, "new") + # Records w/ quick exec should be skipped by the cron + self.backend._cron_check_output_exchange_sync() + for rec in self.records: + self.assertEqual(rec.edi_exchange_state, "new") + @mute_logger(*LOGGERS) def test_exchange_generate_output_ready_auto_send(self): # No content ready to be sent, will get the content and send it diff --git a/edi_core_oca/views/edi_exchange_type_views.xml b/edi_core_oca/views/edi_exchange_type_views.xml index 49453e842..244019da9 100644 --- a/edi_core_oca/views/edi_exchange_type_views.xml +++ b/edi_core_oca/views/edi_exchange_type_views.xml @@ -43,11 +43,17 @@ - + + - From 4d7cd6bbe378ee4257c67f13838b833a979369e9 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Fri, 6 Feb 2026 10:31:26 +0000 Subject: [PATCH 003/145] [UPD] Update edi_core_oca.pot --- edi_core_oca/i18n/edi_core_oca.pot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/edi_core_oca/i18n/edi_core_oca.pot b/edi_core_oca/i18n/edi_core_oca.pot index c77ee2f77..d599fe05b 100644 --- a/edi_core_oca/i18n/edi_core_oca.pot +++ b/edi_core_oca/i18n/edi_core_oca.pot @@ -1608,7 +1608,8 @@ msgstr "" #: model:ir.model.fields,help:edi_core_oca.field_edi_exchange_type__quick_exec msgid "" "When active, records of this type will be processed immediately without " -"waiting for the cron to pass by." +"waiting for the cron to pass by. Requires auto generate flag to be active as" +" well. The cron will skip these records unless forced." msgstr "" #. module: edi_core_oca From 33c85ef6834c506535cbb4c8a124677369b605e9 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Fri, 6 Feb 2026 10:31:28 +0000 Subject: [PATCH 004/145] [UPD] Update edi_oca.pot --- edi_oca/i18n/edi_oca.pot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/edi_oca/i18n/edi_oca.pot b/edi_oca/i18n/edi_oca.pot index bd4283165..4db84723b 100644 --- a/edi_oca/i18n/edi_oca.pot +++ b/edi_oca/i18n/edi_oca.pot @@ -1453,7 +1453,8 @@ msgstr "" #: model:ir.model.fields,help:edi_oca.field_edi_exchange_type__quick_exec msgid "" "When active, records of this type will be processed immediately without " -"waiting for the cron to pass by." +"waiting for the cron to pass by. Requires auto generate flag to be active as" +" well. The cron will skip these records unless forced." msgstr "" #. module: edi_oca From 281050b27b0caa069c854eda45a21a0f37ad30e1 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 6 Feb 2026 10:35:24 +0000 Subject: [PATCH 005/145] [BOT] post-merge updates --- README.md | 2 +- edi_core_oca/README.rst | 2 +- edi_core_oca/__manifest__.py | 2 +- edi_core_oca/static/description/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 35b61245d..7ba24b384 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ addon | version | maintainers | summary [edi_account_core_oca](edi_account_core_oca/) | 18.0.1.1.1 | etobella | Define EDI Configuration for Account Moves [edi_account_oca](edi_account_oca/) | 18.0.1.1.1 | etobella | Define some component listeners for Account Moves [edi_component_oca](edi_component_oca/) | 18.0.1.0.2 | simahawk etobella | Allow to use Connector as a source in EDI -[edi_core_oca](edi_core_oca/) | 18.0.1.5.6 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. +[edi_core_oca](edi_core_oca/) | 18.0.1.6.0 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. [edi_endpoint_oca](edi_endpoint_oca/) | 18.0.1.0.3 | | Base module allowing configuration of custom endpoints for EDI framework. [edi_exchange_template_oca](edi_exchange_template_oca/) | 18.0.1.3.2 | simahawk | Allows definition of exchanges via templates. [edi_exchange_template_party_data](edi_exchange_template_party_data/) | 18.0.1.0.1 | simahawk | Glue module between edi_exchange_template and edi_party_data diff --git a/edi_core_oca/README.rst b/edi_core_oca/README.rst index 7b34951d6..4e3f221be 100644 --- a/edi_core_oca/README.rst +++ b/edi_core_oca/README.rst @@ -11,7 +11,7 @@ EDI !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:05f11d491e9ac910591ac4fbb7dc7372d0efb74d2b81b38dd84b58a526739cfc + !! source digest: sha256:1949f87b78e227c0b7d68a4b8967de8fc28a273125c228aad2d3a906b10923d8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/edi_core_oca/__manifest__.py b/edi_core_oca/__manifest__.py index 83a9d7452..a4e8ff8b9 100644 --- a/edi_core_oca/__manifest__.py +++ b/edi_core_oca/__manifest__.py @@ -9,7 +9,7 @@ Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. """, - "version": "18.0.1.5.6", + "version": "18.0.1.6.0", "website": "https://github.com/OCA/edi-framework", "development_status": "Beta", "license": "LGPL-3", diff --git a/edi_core_oca/static/description/index.html b/edi_core_oca/static/description/index.html index fa279ca4c..a946bb227 100644 --- a/edi_core_oca/static/description/index.html +++ b/edi_core_oca/static/description/index.html @@ -372,7 +372,7 @@

EDI

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:05f11d491e9ac910591ac4fbb7dc7372d0efb74d2b81b38dd84b58a526739cfc +!! source digest: sha256:1949f87b78e227c0b7d68a4b8967de8fc28a273125c228aad2d3a906b10923d8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

Base EDI backend.

From be9a7632a176f2d4a5715d1a9044b812cb578f37 Mon Sep 17 00:00:00 2001 From: Weblate Date: Fri, 6 Feb 2026 10:35:33 +0000 Subject: [PATCH 006/145] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: edi-framework-18.0/edi-framework-18.0-edi_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_oca/ --- edi_oca/i18n/it.po | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/edi_oca/i18n/it.po b/edi_oca/i18n/it.po index 9f91ca259..4c524e0cb 100644 --- a/edi_oca/i18n/it.po +++ b/edi_oca/i18n/it.po @@ -1560,10 +1560,9 @@ msgstr "Cronologia comunicazioni sito web" #: model:ir.model.fields,help:edi_oca.field_edi_exchange_type__quick_exec msgid "" "When active, records of this type will be processed immediately without " -"waiting for the cron to pass by." +"waiting for the cron to pass by. Requires auto generate flag to be active as " +"well. The cron will skip these records unless forced." msgstr "" -"Quando attiva, i record di questo tipo verranno elaborati immediatamente " -"senza attendere il cron." #. module: edi_oca #: model:ir.model.fields,help:edi_oca.field_edi_exchange_consumer_mixin__edi_disable_auto @@ -1585,6 +1584,13 @@ msgstr "" msgid "error on send" msgstr "errore nell'invio" +#~ msgid "" +#~ "When active, records of this type will be processed immediately without " +#~ "waiting for the cron to pass by." +#~ msgstr "" +#~ "Quando attiva, i record di questo tipo verranno elaborati immediatamente " +#~ "senza attendere il cron." + #~ msgid "" #~ "For output exchange types this should be a formatting string with the " #~ "following variables available (to be used between brackets, `{}`): " From c3e3de7c28381d37715247718c3e9ae06d0c45f5 Mon Sep 17 00:00:00 2001 From: Weblate Date: Fri, 6 Feb 2026 10:35:33 +0000 Subject: [PATCH 007/145] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: edi-framework-18.0/edi-framework-18.0-edi_core_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_core_oca/ --- edi_core_oca/i18n/es.po | 3 ++- edi_core_oca/i18n/fr.po | 3 ++- edi_core_oca/i18n/it.po | 12 +++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/edi_core_oca/i18n/es.po b/edi_core_oca/i18n/es.po index 36f9a0c0d..3fecfe8e6 100644 --- a/edi_core_oca/i18n/es.po +++ b/edi_core_oca/i18n/es.po @@ -1618,7 +1618,8 @@ msgstr "" #: model:ir.model.fields,help:edi_core_oca.field_edi_exchange_type__quick_exec msgid "" "When active, records of this type will be processed immediately without " -"waiting for the cron to pass by." +"waiting for the cron to pass by. Requires auto generate flag to be active as " +"well. The cron will skip these records unless forced." msgstr "" #. module: edi_core_oca diff --git a/edi_core_oca/i18n/fr.po b/edi_core_oca/i18n/fr.po index ee73e8c5f..dc7d2a607 100644 --- a/edi_core_oca/i18n/fr.po +++ b/edi_core_oca/i18n/fr.po @@ -1636,7 +1636,8 @@ msgstr "" #: model:ir.model.fields,help:edi_core_oca.field_edi_exchange_type__quick_exec msgid "" "When active, records of this type will be processed immediately without " -"waiting for the cron to pass by." +"waiting for the cron to pass by. Requires auto generate flag to be active as " +"well. The cron will skip these records unless forced." msgstr "" #. module: edi_core_oca diff --git a/edi_core_oca/i18n/it.po b/edi_core_oca/i18n/it.po index 0ee1522e0..311feb1bd 100644 --- a/edi_core_oca/i18n/it.po +++ b/edi_core_oca/i18n/it.po @@ -1721,10 +1721,9 @@ msgstr "Cronologia comunicazioni sito web" #: model:ir.model.fields,help:edi_core_oca.field_edi_exchange_type__quick_exec msgid "" "When active, records of this type will be processed immediately without " -"waiting for the cron to pass by." +"waiting for the cron to pass by. Requires auto generate flag to be active as " +"well. The cron will skip these records unless forced." msgstr "" -"Quando attiva, i record di questo tipo verranno elaborati immediatamente " -"senza attendere il cron." #. module: edi_core_oca #: model:ir.model.fields,help:edi_core_oca.field_edi_exchange_consumer_mixin__edi_disable_auto @@ -1746,6 +1745,13 @@ msgstr "" msgid "error on send" msgstr "errore nell'invio" +#~ msgid "" +#~ "When active, records of this type will be processed immediately without " +#~ "waiting for the cron to pass by." +#~ msgstr "" +#~ "Quando attiva, i record di questo tipo verranno elaborati immediatamente " +#~ "senza attendere il cron." + #~ msgid "" #~ "For output exchange types this should be a formatting string with the " #~ "following variables available (to be used between brackets, `{}`): " From 39369727a198543c82108d426cb976d4f5595850 Mon Sep 17 00:00:00 2001 From: ThiagoMForgeFlow Date: Tue, 28 Oct 2025 15:17:00 +0100 Subject: [PATCH 008/145] [FIX] edi_core_oca: fix search logic Maintaining this part of code can occur a visual issue. If the result variable has 80 records (default by Odoo) and the orig_ids is less than result, Odoo only shows the orig_ids, and we lost the previous work finding next records. --- edi_core_oca/models/edi_exchange_record.py | 2 - edi_core_oca/tests/test_security.py | 73 ++++++++++++++++++++++ 2 files changed, 73 insertions(+), 2 deletions(-) diff --git a/edi_core_oca/models/edi_exchange_record.py b/edi_core_oca/models/edi_exchange_record.py index 824fe01a7..d1ee76ca5 100644 --- a/edi_core_oca/models/edi_exchange_record.py +++ b/edi_core_oca/models/edi_exchange_record.py @@ -616,8 +616,6 @@ def _search(self, domain, offset=0, limit=None, order=None): extend_ids = list(extend_query) result.extend(extend_ids[: limit - len(result)]) - # Restore original ordering - result = [x for x in orig_ids if x in result] if set(orig_ids) != set(result): # Create a virgin query query = self.browse(result)._as_query() diff --git a/edi_core_oca/tests/test_security.py b/edi_core_oca/tests/test_security.py index a8bca2f94..13dd1ee1d 100644 --- a/edi_core_oca/tests/test_security.py +++ b/edi_core_oca/tests/test_security.py @@ -238,3 +238,76 @@ def test_no_group_no_read_child(self): msg = rf"not allowed to access '{model._description}' \({model._name}\)" with self.assertRaisesRegex(AccessError, msg): child_exchange_record.with_user(self.user).read() + + def test_search_pagination_with_inaccessible_middle_records(self): + """ + Regression test: + If some records in the first page are filtered out due to access rules, + _search must fetch additional records from next pages without truncating them. + """ + + self.user.write({"groups_id": [(4, self.group.id)]}) + + # Two different companies are used to trigger multi-company access filtering + company_1 = self.env.ref("base.main_company") + company_2 = self.env["res.company"].create({"name": "Other Company"}) + + # Three target records: + # - consumer_c1 and consumer_c3 belong to the active company and are readable + # - consumer_c2 belongs to another company and will be filtered out + # by access rules + consumer_c1 = self.env["res.partner"].create( + {"name": "c1-a", "company_id": company_1.id} + ) + consumer_c2 = self.env["res.partner"].create( + {"name": "c2", "company_id": company_2.id} + ) + consumer_c3 = self.env["res.partner"].create( + {"name": "c1-b", "company_id": company_1.id} + ) + + # One EDI records pointing to readable target records + self.backend.create_record( + "test_csv_output", + {"model": consumer_c1._name, "res_id": consumer_c1.id}, + ) + + # One EDI records pointing to records from another company + self.backend.create_record( + "test_csv_output", + {"model": consumer_c2._name, "res_id": consumer_c2.id}, + ) + + # One EDI records pointing to readable target records + visible_id_2 = self.backend.create_record( + "test_csv_output", + {"model": consumer_c3._name, "res_id": consumer_c3.id}, + ).id + + # Restrict the environment to company_1 only, activating the multi-company rule + # that will hide records pointing to consumer_c2 + env_company_1 = self.env( + context=dict(self.env.context, allowed_company_ids=[company_1.id]) + ) + + # Execute the search as a non-superuser: + # - super()._search returns the first 2 IDs (1 visible + 1 hidden) + # - custom logic removes the 1 hidden + # - pagination logic fetches 1 more record from the next page + records = ( + env_company_1["edi.exchange.record"] + .with_user(self.user) + .search([], limit=2, order="id asc") + ) + + # The result must NOT be truncated: the search should still return ` + # limit` records + self.assertEqual( + len(records), + 2, + "Search results were truncated when inaccessible records were " + "present in the first page", + ) + + # The records fetched from the second page must be present in the final result + self.assertIn(visible_id_2, records.ids) From 2278b830a54408438a6a01b59910024057db3bd0 Mon Sep 17 00:00:00 2001 From: mymage Date: Tue, 10 Feb 2026 12:57:55 +0000 Subject: [PATCH 009/145] Translated using Weblate (Italian) Currently translated at 100.0% (276 of 276 strings) Translation: edi-framework-18.0/edi-framework-18.0-edi_core_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_core_oca/it/ --- edi_core_oca/i18n/it.po | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/edi_core_oca/i18n/it.po b/edi_core_oca/i18n/it.po index 311feb1bd..68ed9f741 100644 --- a/edi_core_oca/i18n/it.po +++ b/edi_core_oca/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 17.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-12-02 15:42+0000\n" +"PO-Revision-Date: 2026-02-10 15:09+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.10.4\n" +"X-Generator: Weblate 5.15.2\n" #. module: edi_core_oca #: model:ir.model.fields,help:edi_core_oca.field_edi_exchange_type__advanced_settings_edit @@ -1724,6 +1724,10 @@ msgid "" "waiting for the cron to pass by. Requires auto generate flag to be active as " "well. The cron will skip these records unless forced." msgstr "" +"Quando attivi, i record di questo tipo verranno elaborati immediatamente, " +"senza attendere il completamento del cron. Richiede che anche il flag di " +"generazione automatica sia attivo. Il cron ignorerà questi record, a meno " +"che non venga forzato." #. module: edi_core_oca #: model:ir.model.fields,help:edi_core_oca.field_edi_exchange_consumer_mixin__edi_disable_auto From 62eba93641bcdd3fbc2d4fc1361342cc1199f327 Mon Sep 17 00:00:00 2001 From: mymage Date: Tue, 10 Feb 2026 12:57:41 +0000 Subject: [PATCH 010/145] Translated using Weblate (Italian) Currently translated at 100.0% (251 of 251 strings) Translation: edi-framework-18.0/edi-framework-18.0-edi_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_oca/it/ --- edi_oca/i18n/it.po | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/edi_oca/i18n/it.po b/edi_oca/i18n/it.po index 4c524e0cb..cbff8fe7c 100644 --- a/edi_oca/i18n/it.po +++ b/edi_oca/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-12-02 15:42+0000\n" +"PO-Revision-Date: 2026-02-10 15:09+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.10.4\n" +"X-Generator: Weblate 5.15.2\n" #. module: edi_oca #: model:ir.model.fields,help:edi_oca.field_edi_exchange_type__advanced_settings_edit @@ -1563,6 +1563,10 @@ msgid "" "waiting for the cron to pass by. Requires auto generate flag to be active as " "well. The cron will skip these records unless forced." msgstr "" +"Quando attivi, i record di questo tipo verranno elaborati immediatamente, " +"senza attendere il completamento del cron. Richiede che anche il flag di " +"generazione automatica sia attivo. Il cron ignorerà questi record, a meno " +"che non venga forzato." #. module: edi_oca #: model:ir.model.fields,help:edi_oca.field_edi_exchange_consumer_mixin__edi_disable_auto From 28da724d7c8de558e6d2c81c40b6b0b5b7766d16 Mon Sep 17 00:00:00 2001 From: Ricardoalso Date: Fri, 13 Feb 2026 14:05:34 +0100 Subject: [PATCH 011/145] [PERF] edi_core_oca: add index to parent_id field Used to display related exchanges --- edi_core_oca/models/edi_exchange_record.py | 1 + 1 file changed, 1 insertion(+) diff --git a/edi_core_oca/models/edi_exchange_record.py b/edi_core_oca/models/edi_exchange_record.py index 8e24a5e9e..4286e2c92 100644 --- a/edi_core_oca/models/edi_exchange_record.py +++ b/edi_core_oca/models/edi_exchange_record.py @@ -113,6 +113,7 @@ class EDIExchangeRecord(models.Model): parent_id = fields.Many2one( comodel_name="edi.exchange.record", help="Original exchange which originated this record", + index=True, ) related_exchange_ids = fields.One2many( string="Related exchanges", From 4570099e36f6524393576993266ead644ac6864b Mon Sep 17 00:00:00 2001 From: Ricardoalso Date: Fri, 13 Feb 2026 14:11:22 +0100 Subject: [PATCH 012/145] [PERF] edi_core_oca: add index to ack_exchange_id field --- edi_core_oca/models/edi_exchange_record.py | 1 + 1 file changed, 1 insertion(+) diff --git a/edi_core_oca/models/edi_exchange_record.py b/edi_core_oca/models/edi_exchange_record.py index 4286e2c92..27d417137 100644 --- a/edi_core_oca/models/edi_exchange_record.py +++ b/edi_core_oca/models/edi_exchange_record.py @@ -134,6 +134,7 @@ class EDIExchangeRecord(models.Model): help="ACK generated for current exchange.", compute="_compute_ack_exchange_id", store=True, + index=True, ) ack_received_on = fields.Datetime( string="ACK received on", related="ack_exchange_id.exchanged_on" From 8f9b882a7afa6ea0fcd1a35c7d0de7c839376ee6 Mon Sep 17 00:00:00 2001 From: Ricardoalso Date: Fri, 20 Feb 2026 15:24:21 +0100 Subject: [PATCH 013/145] [FIX] edi_*_oca: New way for FakeModelLoader --- .../tests/test_edi_configuration.py | 70 ++++++++-------- edi_core_oca/tests/test_backend_base.py | 29 +++---- edi_core_oca/tests/test_backend_input.py | 52 +++++------- edi_core_oca/tests/test_backend_output.py | 49 +++++------- edi_core_oca/tests/test_backend_process.py | 50 +++++------- edi_core_oca/tests/test_backend_validate.py | 60 ++++++-------- edi_core_oca/tests/test_consumer_mixin.py | 39 ++++----- edi_core_oca/tests/test_edi_backend_cron.py | 62 ++++++-------- edi_core_oca/tests/test_edi_configuration.py | 80 +++++++++---------- .../tests/test_exchange_type_configuration.py | 36 ++++----- .../tests/test_exchange_type_encoding.py | 46 +++++------ edi_core_oca/tests/test_quick_exec.py | 40 ++++------ edi_core_oca/tests/test_security.py | 48 +++++------ .../tests/test_edi_backend_output.py | 16 +++- edi_queue_oca/tests/test_backend_jobs.py | 32 ++++---- .../tests/test_metadata.py | 26 +++--- edi_state_oca/tests/test_edi_state.py | 56 ++++++------- 17 files changed, 348 insertions(+), 443 deletions(-) diff --git a/edi_component_oca/tests/test_edi_configuration.py b/edi_component_oca/tests/test_edi_configuration.py index 509b3e2ab..acb9267d9 100644 --- a/edi_component_oca/tests/test_edi_configuration.py +++ b/edi_component_oca/tests/test_edi_configuration.py @@ -40,66 +40,64 @@ def setUpClass(cls): def setUp(self): super().setUp() - FakeOutputGenerator.reset_faked() - FakeOutputSender.reset_faked() - FakeOutputChecker.reset_faked() - self.consumer_record = self.env["edi.exchange.consumer.test"].create( - { - "name": "Test Consumer", - "edi_config_ids": [ - (4, self.create_config.id), - (4, self.write_config.id), - ], - } - ) - - @classmethod - def _setup_records(cls): # pylint:disable=missing-return - super()._setup_records() - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() from odoo.addons.edi_core_oca.tests.fake_models import EdiExchangeConsumerTest EdiExchangeConsumerTest._edi_config_field_relation = lambda self: self.env[ "edi.configuration" ] - # We need to override it, as we want to test the usage with components + self.loader.update_registry((EdiExchangeConsumerTest,)) - cls.loader.update_registry((EdiExchangeConsumerTest,)) - cls.exchange_type_out.exchange_filename_pattern = "{record.id}" - cls.edi_configuration = cls.env["edi.configuration"] - cls.create_config = cls.edi_configuration.create( + FakeOutputGenerator.reset_faked() + FakeOutputSender.reset_faked() + FakeOutputChecker.reset_faked() + + self.create_config = self.env["edi.configuration"].create( { "name": "Create Config", "active": True, - "backend_id": cls.backend.id, - "type_id": cls.exchange_type_out.id, - "trigger_id": cls.env.ref( + "backend_id": self.backend.id, + "type_id": self.exchange_type_out.id, + "trigger_id": self.env.ref( "edi_core_oca.edi_conf_trigger_record_create" ).id, - "model_id": cls.env["ir.model"]._get_id("edi.exchange.consumer.test"), + "model_id": self.env["ir.model"]._get_id("edi.exchange.consumer.test"), "snippet_do": "record._edi_send_via_edi(conf.type_id)", } ) - cls.write_config = cls.edi_configuration.create( + self.write_config = self.env["edi.configuration"].create( { "name": "Write Config 1", "active": True, - "backend_id": cls.backend.id, - "type_id": cls.exchange_type_out.id, - "trigger_id": cls.env.ref( + "backend_id": self.backend.id, + "type_id": self.exchange_type_out.id, + "trigger_id": self.env.ref( "edi_core_oca.edi_conf_trigger_record_write" ).id, - "model_id": cls.env["ir.model"]._get_id("edi.exchange.consumer.test"), + "model_id": self.env["ir.model"]._get_id("edi.exchange.consumer.test"), "snippet_do": "record._edi_send_via_edi(conf.type_id)", } ) + self.consumer_record = self.env["edi.exchange.consumer.test"].create( + { + "name": "Test Consumer", + "edi_config_ids": [ + (4, self.create_config.id), + (4, self.write_config.id), + ], + } + ) + @classmethod - def tearDownClass(cls): - cls.loader.restore_registry() - super().tearDownClass() + def _setup_records(cls): # pylint:disable=missing-return + super()._setup_records() + cls.exchange_type_out.exchange_filename_pattern = "{record.id}" + + def tearDown(self): + self.loader.restore_registry() + super().tearDown() def test_edi_send_via_edi_config(self): # Check configuration on create diff --git a/edi_core_oca/tests/test_backend_base.py b/edi_core_oca/tests/test_backend_base.py index 0bda10c0a..bb4bb322a 100644 --- a/edi_core_oca/tests/test_backend_base.py +++ b/edi_core_oca/tests/test_backend_base.py @@ -11,25 +11,22 @@ class EDIBackendTestCaseBase(EDIBackendCommonTestCase): - @classmethod - def _setup_records(cls): # pylint:disable=missing-return - super()._setup_records() - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() + def setUp(self): + super().setUp() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() from .fake_models import EdiTestExecution - cls.loader.update_registry((EdiTestExecution,)) - cls.ExecutionAbstractModel = cls.env["edi.framework.test.execution"] - cls.model = cls.env["ir.model"]._get("edi.framework.test.execution") - cls.exchange_type_in.receive_model_id = cls.model - cls.exchange_type_in.process_model_id = cls.model - cls.exchange_type_in.input_validate_model_id = cls.model + self.loader.update_registry((EdiTestExecution,)) + self.ExecutionAbstractModel = self.env["edi.framework.test.execution"] + self.model = self.env["ir.model"]._get("edi.framework.test.execution") + self.exchange_type_in.receive_model_id = self.model + self.exchange_type_in.process_model_id = self.model + self.exchange_type_in.input_validate_model_id = self.model - @classmethod - def tearDownClass(cls): - cls.loader.restore_registry() - super().tearDownClass() + def tearDown(self): + self.loader.restore_registry() + super().tearDown() @freeze_time("2020-10-21 10:00:00") def test_create_record(self): diff --git a/edi_core_oca/tests/test_backend_input.py b/edi_core_oca/tests/test_backend_input.py index 0c59f471a..89d7fe13f 100644 --- a/edi_core_oca/tests/test_backend_input.py +++ b/edi_core_oca/tests/test_backend_input.py @@ -8,37 +8,6 @@ class EDIBackendTestInputCase(EDIBackendCommonTestCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - vals = { - "model": cls.partner._name, - "res_id": cls.partner.id, - } - cls.record = cls.backend.create_record("test_csv_input", vals) - - @classmethod - def _setup_records(cls): # pylint:disable=missing-return - super()._setup_records() - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() - from .fake_models import EdiTestExecution - - cls.loader.update_registry((EdiTestExecution,)) - cls.ExecutionAbstractModel = cls.env["edi.framework.test.execution"] - cls.model = cls.env["ir.model"].search( - [("model", "=", "edi.framework.test.execution")] - ) - cls.exchange_type_in.receive_model_id = cls.model - cls.exchange_type_in.process_model_id = cls.model - cls.exchange_type_in.input_validate_model_id = cls.model - - @classmethod - def tearDownClass(cls): - cls.loader.restore_registry() - super().tearDownClass() - @classmethod def _setup_context(cls): return dict( @@ -49,8 +18,29 @@ def _setup_context(cls): def setUp(self): super().setUp() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() + from .fake_models import EdiTestExecution + + self.loader.update_registry((EdiTestExecution,)) + self.ExecutionAbstractModel = self.env["edi.framework.test.execution"] + self.model = self.env["ir.model"].search( + [("model", "=", "edi.framework.test.execution")] + ) + self.exchange_type_in.receive_model_id = self.model + self.exchange_type_in.process_model_id = self.model + self.exchange_type_in.input_validate_model_id = self.model + vals = { + "model": self.partner._name, + "res_id": self.partner.id, + } + self.record = self.backend.create_record("test_csv_input", vals) self.ExecutionAbstractModel.reset_faked("receive") + def tearDown(self): + self.loader.restore_registry() + super().tearDown() + def test_receive_record_nothing_todo(self): self.backend.with_context(fake_output="yeah!").exchange_receive(self.record) self.assertEqual(self.record._get_file_content(), "") diff --git a/edi_core_oca/tests/test_backend_output.py b/edi_core_oca/tests/test_backend_output.py index b9140b710..69bd07fe8 100644 --- a/edi_core_oca/tests/test_backend_output.py +++ b/edi_core_oca/tests/test_backend_output.py @@ -15,44 +15,33 @@ class EDIBackendTestOutputCase(EDIBackendCommonTestCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - - vals = { - "model": cls.partner._name, - "res_id": cls.partner.id, - } - cls.record = cls.backend.create_record("test_csv_output", vals) - - @classmethod - def _setup_records(cls): # pylint:disable=missing-return - super()._setup_records() - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() + def setUp(self): + super().setUp() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() from .fake_models import EdiTestExecution - cls.loader.update_registry((EdiTestExecution,)) - cls.ExecutionAbstractModel = cls.env["edi.framework.test.execution"] - cls.model = cls.env["ir.model"].search( + self.loader.update_registry((EdiTestExecution,)) + self.ExecutionAbstractModel = self.env["edi.framework.test.execution"] + self.model = self.env["ir.model"].search( [("model", "=", "edi.framework.test.execution")] ) - cls.exchange_type_out.generate_model_id = cls.model - cls.exchange_type_out.send_model_id = cls.model - cls.exchange_type_out.output_validate_model_id = cls.model - - @classmethod - def tearDownClass(cls): - cls.loader.restore_registry() - super().tearDownClass() - - def setUp(self): - super().setUp() + self.exchange_type_out.generate_model_id = self.model + self.exchange_type_out.send_model_id = self.model + self.exchange_type_out.output_validate_model_id = self.model + vals = { + "model": self.partner._name, + "res_id": self.partner.id, + } + self.record = self.backend.create_record("test_csv_output", vals) self.ExecutionAbstractModel.reset_faked("generate") self.ExecutionAbstractModel.reset_faked("send") self.ExecutionAbstractModel.reset_faked("check") + def tearDown(self): + self.loader.restore_registry() + super().tearDown() + def test_generate_record_output(self): self.record.with_context(fake_output="yeah!").action_exchange_generate() self.assertEqual(self.record._get_file_content(), "yeah!") diff --git a/edi_core_oca/tests/test_backend_process.py b/edi_core_oca/tests/test_backend_process.py index fefbf21e1..913abfb6d 100644 --- a/edi_core_oca/tests/test_backend_process.py +++ b/edi_core_oca/tests/test_backend_process.py @@ -15,42 +15,32 @@ class EDIBackendTestProcessCase(EDIBackendCommonTestCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - vals = { - "model": cls.partner._name, - "res_id": cls.partner.id, - "exchange_file": base64.b64encode(b"1234"), - } - cls.record = cls.backend.create_record("test_csv_input", vals) - - @classmethod - def _setup_records(cls): # pylint:disable=missing-return - super()._setup_records() - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() + def setUp(self): + super().setUp() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() from .fake_models import EdiTestExecution - cls.loader.update_registry((EdiTestExecution,)) - cls.ExecutionAbstractModel = cls.env["edi.framework.test.execution"] - cls.model = cls.env["ir.model"].search( + self.loader.update_registry((EdiTestExecution,)) + self.ExecutionAbstractModel = self.env["edi.framework.test.execution"] + self.model = self.env["ir.model"].search( [("model", "=", "edi.framework.test.execution")] ) - cls.exchange_type_in.generate_model_id = cls.model - cls.exchange_type_in.process_model_id = cls.model - cls.exchange_type_in.input_validate_model_id = cls.model - - @classmethod - def tearDownClass(cls): - cls.loader.restore_registry() - super().tearDownClass() - - def setUp(self): - super().setUp() + self.exchange_type_in.generate_model_id = self.model + self.exchange_type_in.process_model_id = self.model + self.exchange_type_in.input_validate_model_id = self.model + vals = { + "model": self.partner._name, + "res_id": self.partner.id, + "exchange_file": base64.b64encode(b"1234"), + } + self.record = self.backend.create_record("test_csv_input", vals) self.ExecutionAbstractModel.reset_faked("process") + def tearDown(self): + self.loader.restore_registry() + super().tearDown() + def test_process_record(self): self.record.write({"edi_exchange_state": "input_received"}) with freeze_time("2020-10-22 10:00:00"): diff --git a/edi_core_oca/tests/test_backend_validate.py b/edi_core_oca/tests/test_backend_validate.py index 990810506..cdac2899d 100644 --- a/edi_core_oca/tests/test_backend_validate.py +++ b/edi_core_oca/tests/test_backend_validate.py @@ -11,50 +11,40 @@ class EDIBackendTestValidateCase(EDIBackendCommonTestCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - vals = { - "model": cls.partner._name, - "res_id": cls.partner.id, - "exchange_file": base64.b64encode(b"1234"), - } - cls.record_in = cls.backend.create_record("test_csv_input", vals) - vals.pop("exchange_file") - cls.record_out = cls.backend.create_record("test_csv_output", vals) - - @classmethod - def _setup_records(cls): # pylint:disable=missing-return - super()._setup_records() - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() + def setUp(self): + super().setUp() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() from .fake_models import EdiTestExecution - cls.loader.update_registry((EdiTestExecution,)) - cls.ExecutionAbstractModel = cls.env["edi.framework.test.execution"] - cls.model = cls.env["ir.model"].search( + self.loader.update_registry((EdiTestExecution,)) + self.ExecutionAbstractModel = self.env["edi.framework.test.execution"] + self.model = self.env["ir.model"].search( [("model", "=", "edi.framework.test.execution")] ) - cls.exchange_type_out.generate_model_id = cls.model - cls.exchange_type_out.send_model_id = cls.model - cls.exchange_type_out.output_validate_model_id = cls.model - cls.exchange_type_in.receive_model_id = cls.model - cls.exchange_type_in.process_model_id = cls.model - cls.exchange_type_in.input_validate_model_id = cls.model - - @classmethod - def tearDownClass(cls): - cls.loader.restore_registry() - super().tearDownClass() - - def setUp(self): - super().setUp() + self.exchange_type_out.generate_model_id = self.model + self.exchange_type_out.send_model_id = self.model + self.exchange_type_out.output_validate_model_id = self.model + self.exchange_type_in.receive_model_id = self.model + self.exchange_type_in.process_model_id = self.model + self.exchange_type_in.input_validate_model_id = self.model + vals = { + "model": self.partner._name, + "res_id": self.partner.id, + "exchange_file": base64.b64encode(b"1234"), + } + self.record_in = self.backend.create_record("test_csv_input", vals) + vals.pop("exchange_file") + self.record_out = self.backend.create_record("test_csv_output", vals) self.ExecutionAbstractModel.reset_faked("input_validate") self.ExecutionAbstractModel.reset_faked("receive") self.ExecutionAbstractModel.reset_faked("generate") self.ExecutionAbstractModel.reset_faked("output_validate") + def tearDown(self): + self.loader.restore_registry() + super().tearDown() + def test_receive_validate_record(self): self.record_in.write({"edi_exchange_state": "input_pending"}) self.backend.exchange_receive(self.record_in) diff --git a/edi_core_oca/tests/test_consumer_mixin.py b/edi_core_oca/tests/test_consumer_mixin.py index 8629edeaa..b078aff4e 100644 --- a/edi_core_oca/tests/test_consumer_mixin.py +++ b/edi_core_oca/tests/test_consumer_mixin.py @@ -19,36 +19,28 @@ # If you still want to run `edi` tests w/ pytest when this happens, set this env var. @skipIf(os.getenv("SKIP_EDI_CONSUMER_CASE"), "Consumer test case disabled.") class TestConsumerMixinCase(EDIBackendCommonTestCase): - @classmethod - def _setup_env(cls): - super()._setup_env() - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() + def setUp(self): + super().setUp() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() from .fake_models import EdiExchangeConsumerTest - cls.loader.update_registry((EdiExchangeConsumerTest,)) - return super()._setup_env() - - # pylint: disable=W8110 - @classmethod - def _setup_records(cls): - super()._setup_records() - cls.consumer_record = cls.env["edi.exchange.consumer.test"].create( + self.loader.update_registry((EdiExchangeConsumerTest,)) + self.consumer_record = self.env["edi.exchange.consumer.test"].create( {"name": "Test Consumer"} ) - cls.exchange_type_out.exchange_filename_pattern = "{record.id}" + self.exchange_type_out.exchange_filename_pattern = "{record.id}" rule_vals = { "name": "Test", - "model_id": cls.env["ir.model"]._get_id(cls.consumer_record._name), + "model_id": self.env["ir.model"]._get_id(self.consumer_record._name), "kind": "custom", "enable_domain": "[]", "enable_snippet": """ result = not record._has_exchange_record(exchange_type) """, } - cls.exchange_type_new = cls._create_exchange_type( + self.exchange_type_new = self._create_exchange_type( name="Test CSV output", code="test_csv_new_output", direction="output", @@ -59,20 +51,19 @@ def _setup_records(cls): ) rule_vals = { "name": "Test", - "model_id": cls.env["ir.model"]._get_id(cls.consumer_record._name), + "model_id": self.env["ir.model"]._get_id(self.consumer_record._name), "kind": "custom", "enable_domain": "[]", "enable_snippet": """ result = not record._has_exchange_record(exchange_type, exchange_type.backend_id) """, } - cls.exchange_type_out.write({"rule_ids": [(0, 0, rule_vals)]}) - cls.backend_02 = cls.backend.copy() + self.exchange_type_out.write({"rule_ids": [(0, 0, rule_vals)]}) + self.backend_02 = self.backend.copy() - @classmethod - def tearDownClass(cls): - cls.loader.restore_registry() - super().tearDownClass() + def tearDown(self): + self.loader.restore_registry() + super().tearDown() def test_mixin(self): self.assertEqual(self.consumer_record.exchange_record_count, 0) diff --git a/edi_core_oca/tests/test_edi_backend_cron.py b/edi_core_oca/tests/test_edi_backend_cron.py index 37d3911bd..9c6aff0fb 100644 --- a/edi_core_oca/tests/test_edi_backend_cron.py +++ b/edi_core_oca/tests/test_edi_backend_cron.py @@ -16,50 +16,40 @@ class EDIBackendTestCronCase(EDIBackendCommonTestCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.partner2 = cls.env.ref("base.res_partner_10") - cls.partner3 = cls.env.ref("base.res_partner_12") - cls.record1 = cls.backend.create_record( - "test_csv_output", {"model": cls.partner._name, "res_id": cls.partner.id} - ) - cls.record2 = cls.backend.create_record( - "test_csv_output", {"model": cls.partner._name, "res_id": cls.partner2.id} - ) - cls.record3 = cls.backend.create_record( - "test_csv_output", {"model": cls.partner._name, "res_id": cls.partner3.id} - ) - cls.records = cls.record1 + cls.record1 + cls.record3 - - @classmethod - def _setup_records(cls): # pylint:disable=missing-return - super()._setup_records() - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() + def setUp(self): + super().setUp() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() from .fake_models import EdiTestExecution - cls.loader.update_registry((EdiTestExecution,)) - cls.ExecutionAbstractModel = cls.env["edi.framework.test.execution"] - cls.model = cls.env["ir.model"].search( + self.loader.update_registry((EdiTestExecution,)) + self.ExecutionAbstractModel = self.env["edi.framework.test.execution"] + self.model = self.env["ir.model"].search( [("model", "=", "edi.framework.test.execution")] ) - cls.exchange_type_out.generate_model_id = cls.model - cls.exchange_type_out.send_model_id = cls.model - cls.exchange_type_out.output_validate_model_id = cls.model - - @classmethod - def tearDownClass(cls): - cls.loader.restore_registry() - super().tearDownClass() - - def setUp(self): - super().setUp() + self.exchange_type_out.generate_model_id = self.model + self.exchange_type_out.send_model_id = self.model + self.exchange_type_out.output_validate_model_id = self.model + self.partner2 = self.env.ref("base.res_partner_10") + self.partner3 = self.env.ref("base.res_partner_12") + self.record1 = self.backend.create_record( + "test_csv_output", {"model": self.partner._name, "res_id": self.partner.id} + ) + self.record2 = self.backend.create_record( + "test_csv_output", {"model": self.partner._name, "res_id": self.partner2.id} + ) + self.record3 = self.backend.create_record( + "test_csv_output", {"model": self.partner._name, "res_id": self.partner3.id} + ) + self.records = self.record1 + self.record1 + self.record3 self.ExecutionAbstractModel.reset_faked("generate") self.ExecutionAbstractModel.reset_faked("send") self.ExecutionAbstractModel.reset_faked("check") + def tearDown(self): + self.loader.restore_registry() + super().tearDown() + @mute_logger(*LOGGERS) def test_exchange_generate_new_no_auto(self): # No content ready to be sent, no auto-generate, nothing happens diff --git a/edi_core_oca/tests/test_edi_configuration.py b/edi_core_oca/tests/test_edi_configuration.py index 88f1a2918..689a8f6c1 100644 --- a/edi_core_oca/tests/test_edi_configuration.py +++ b/edi_core_oca/tests/test_edi_configuration.py @@ -24,65 +24,61 @@ def setUpClass(cls): def setUp(self): super().setUp() - self.ExecutionAbstractModel.reset_faked("generate") - self.ExecutionAbstractModel.reset_faked("send") - self.ExecutionAbstractModel.reset_faked("check") - self.consumer_record = self.env["edi.exchange.consumer.test"].create( - { - "name": "Test Consumer", - "edi_config_ids": [ - (4, self.create_config.id), - (4, self.write_config.id), - ], - } - ) - - @classmethod - def _setup_records(cls): # pylint:disable=missing-return - super()._setup_records() - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() from .fake_models import EdiExchangeConsumerTest, EdiTestExecution - cls.loader.update_registry((EdiExchangeConsumerTest, EdiTestExecution)) - cls.ExecutionAbstractModel = cls.env["edi.framework.test.execution"] - cls.model = cls.env["ir.model"].search( + self.loader.update_registry((EdiExchangeConsumerTest, EdiTestExecution)) + self.ExecutionAbstractModel = self.env["edi.framework.test.execution"] + self.model = self.env["ir.model"].search( [("model", "=", "edi.framework.test.execution")] ) - cls.exchange_type_out.generate_model_id = cls.model - cls.exchange_type_out.send_model_id = cls.model - cls.exchange_type_out.exchange_filename_pattern = "{record.id}" - cls.edi_configuration = cls.env["edi.configuration"] - cls.create_trigger = cls.env.ref("edi_core_oca.edi_conf_trigger_record_create") - cls.write_trigger = cls.env.ref("edi_core_oca.edi_conf_trigger_record_write") - cls.create_config = cls.edi_configuration.create( + self.exchange_type_out.generate_model_id = self.model + self.exchange_type_out.send_model_id = self.model + self.exchange_type_out.exchange_filename_pattern = "{record.id}" + self.edi_configuration = self.env["edi.configuration"] + self.create_trigger = self.env.ref( + "edi_core_oca.edi_conf_trigger_record_create" + ) + self.write_trigger = self.env.ref("edi_core_oca.edi_conf_trigger_record_write") + self.create_config = self.edi_configuration.create( { "name": "Create Config", "active": True, - "backend_id": cls.backend.id, - "type_id": cls.exchange_type_out.id, - "trigger_id": cls.create_trigger.id, - "model_id": cls.env["ir.model"]._get_id("edi.exchange.consumer.test"), + "backend_id": self.backend.id, + "type_id": self.exchange_type_out.id, + "trigger_id": self.create_trigger.id, + "model_id": self.env["ir.model"]._get_id("edi.exchange.consumer.test"), "snippet_do": "record._edi_send_via_edi(conf.type_id)", } ) - cls.write_config = cls.edi_configuration.create( + self.write_config = self.edi_configuration.create( { "name": "Write Config 1", "active": True, - "backend_id": cls.backend.id, - "type_id": cls.exchange_type_out.id, - "trigger_id": cls.write_trigger.id, - "model_id": cls.env["ir.model"]._get_id("edi.exchange.consumer.test"), + "backend_id": self.backend.id, + "type_id": self.exchange_type_out.id, + "trigger_id": self.write_trigger.id, + "model_id": self.env["ir.model"]._get_id("edi.exchange.consumer.test"), "snippet_do": "record._edi_send_via_edi(conf.type_id)", } ) + self.ExecutionAbstractModel.reset_faked("generate") + self.ExecutionAbstractModel.reset_faked("send") + self.ExecutionAbstractModel.reset_faked("check") + self.consumer_record = self.env["edi.exchange.consumer.test"].create( + { + "name": "Test Consumer", + "edi_config_ids": [ + (4, self.create_config.id), + (4, self.write_config.id), + ], + } + ) - @classmethod - def tearDownClass(cls): - cls.loader.restore_registry() - super().tearDownClass() + def tearDown(self): + self.loader.restore_registry() + super().tearDown() def test_edi_send_via_edi_config(self): # Check configuration on create diff --git a/edi_core_oca/tests/test_exchange_type_configuration.py b/edi_core_oca/tests/test_exchange_type_configuration.py index 2f93a4ef0..931dcbc71 100644 --- a/edi_core_oca/tests/test_exchange_type_configuration.py +++ b/edi_core_oca/tests/test_exchange_type_configuration.py @@ -16,33 +16,29 @@ def setUpClass(cls): } cls.record = cls.backend.create_record("test_csv_output", vals) - @classmethod - def _setup_records(cls): # pylint:disable=missing-return - super()._setup_records() - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() + def setUp(self): + super().setUp() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() from .fake_models import EdiTestExecution, EdiTestExecutionExtra - cls.loader.update_registry((EdiTestExecution, EdiTestExecutionExtra)) - cls.ExecutionAbstractModel = cls.env["edi.framework.test.execution"] - cls.ExecutionAbstractModelExtra = cls.env["edi.framework.test.execution.extra"] - cls.model = cls.env["ir.model"].search( + self.loader.update_registry((EdiTestExecution, EdiTestExecutionExtra)) + self.ExecutionAbstractModel = self.env["edi.framework.test.execution"] + self.ExecutionAbstractModelExtra = self.env[ + "edi.framework.test.execution.extra" + ] + self.model = self.env["ir.model"].search( [("model", "=", "edi.framework.test.execution")] ) - cls.exchange_type_out.generate_model_id = cls.model - cls.exchange_type_out.send_model_id = cls.model - - @classmethod - def tearDownClass(cls): - cls.loader.restore_registry() - super().tearDownClass() - - def setUp(self): - super().setUp() + self.exchange_type_out.generate_model_id = self.model + self.exchange_type_out.send_model_id = self.model self.ExecutionAbstractModel.reset_faked("generate") self.ExecutionAbstractModelExtra.reset_faked("validate") + def tearDown(self): + self.loader.restore_registry() + super().tearDown() + def test_multiple_configuration(self): vals = { "model": self.partner._name, diff --git a/edi_core_oca/tests/test_exchange_type_encoding.py b/edi_core_oca/tests/test_exchange_type_encoding.py index f83a522f1..295669ec9 100644 --- a/edi_core_oca/tests/test_exchange_type_encoding.py +++ b/edi_core_oca/tests/test_exchange_type_encoding.py @@ -9,40 +9,30 @@ class EDIBackendTestOutputCase(EDIBackendCommonTestCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - vals = { - "model": cls.partner._name, - "res_id": cls.partner.id, - } - cls.record = cls.backend.create_record("test_csv_output", vals) - - @classmethod - def _setup_records(cls): # pylint:disable=missing-return - super()._setup_records() - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() + def setUp(self): + super().setUp() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() from .fake_models import EdiTestExecution - cls.loader.update_registry((EdiTestExecution,)) - cls.ExecutionAbstractModel = cls.env["edi.framework.test.execution"] - cls.model = cls.env["ir.model"].search( + self.loader.update_registry((EdiTestExecution,)) + self.ExecutionAbstractModel = self.env["edi.framework.test.execution"] + self.model = self.env["ir.model"].search( [("model", "=", "edi.framework.test.execution")] ) - cls.exchange_type_out.generate_model_id = cls.model - cls.exchange_type_out.send_model_id = cls.model - - @classmethod - def tearDownClass(cls): - cls.loader.restore_registry() - super().tearDownClass() - - def setUp(self): - super().setUp() + self.exchange_type_out.generate_model_id = self.model + self.exchange_type_out.send_model_id = self.model + vals = { + "model": self.partner._name, + "res_id": self.partner.id, + } + self.record = self.backend.create_record("test_csv_output", vals) self.ExecutionAbstractModel.reset_faked("generate") + def tearDown(self): + self.loader.restore_registry() + super().tearDown() + def test_encoding_default(self): """ Test default output/input encoding (UTF-8). Use string with special diff --git a/edi_core_oca/tests/test_quick_exec.py b/edi_core_oca/tests/test_quick_exec.py index b777eaeaa..16a114462 100644 --- a/edi_core_oca/tests/test_quick_exec.py +++ b/edi_core_oca/tests/test_quick_exec.py @@ -25,38 +25,32 @@ def setUpClass(cls): cls.partner2 = cls.env.ref("base.res_partner_10") cls.partner3 = cls.env.ref("base.res_partner_12") - @classmethod - def _setup_records(cls): # pylint:disable=missing-return - super()._setup_records() - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() + def setUp(self): + super().setUp() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() from .fake_models import EdiTestExecution - cls.loader.update_registry((EdiTestExecution,)) - cls.ExecutionAbstractModel = cls.env["edi.framework.test.execution"] - cls.model = cls.env["ir.model"].search( + self.loader.update_registry((EdiTestExecution,)) + self.ExecutionAbstractModel = self.env["edi.framework.test.execution"] + self.model = self.env["ir.model"].search( [("model", "=", "edi.framework.test.execution")] ) - cls.exchange_type_out.generate_model_id = cls.model - cls.exchange_type_out.send_model_id = cls.model - cls.exchange_type_out.output_validate_model_id = cls.model - cls.exchange_type_in.generate_model_id = cls.model - cls.exchange_type_in.process_model_id = cls.model - cls.exchange_type_in.input_validate_model_id = cls.model - - @classmethod - def tearDownClass(cls): - cls.loader.restore_registry() - super().tearDownClass() - - def setUp(self): - super().setUp() + self.exchange_type_out.generate_model_id = self.model + self.exchange_type_out.send_model_id = self.model + self.exchange_type_out.output_validate_model_id = self.model + self.exchange_type_in.generate_model_id = self.model + self.exchange_type_in.process_model_id = self.model + self.exchange_type_in.input_validate_model_id = self.model self.ExecutionAbstractModel.reset_faked("generate") self.ExecutionAbstractModel.reset_faked("send") self.ExecutionAbstractModel.reset_faked("check") self.ExecutionAbstractModel.reset_faked("process") + def tearDown(self): + self.loader.restore_registry() + super().tearDown() + @mute_logger(*LOGGERS) def test_quick_exec_on_create_no_call(self): vals = { diff --git a/edi_core_oca/tests/test_security.py b/edi_core_oca/tests/test_security.py index a8bca2f94..e2e241619 100644 --- a/edi_core_oca/tests/test_security.py +++ b/edi_core_oca/tests/test_security.py @@ -11,65 +11,57 @@ class TestEDIExchangeRecordSecurity(EDIBackendCommonTestCase): - @classmethod - def _setup_env(cls): - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() + def setUp(self): + super().setUp() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() from .fake_models import EdiExchangeConsumerTest - cls.loader.update_registry((EdiExchangeConsumerTest,)) - return super()._setup_env() - - # pylint: disable=W8110 - @classmethod - def _setup_records(cls): - super()._setup_records() - cls.group = cls.env["res.groups"].create({"name": "Demo Group"}) - cls.ir_access = cls.env["ir.model.access"].create( + self.loader.update_registry((EdiExchangeConsumerTest,)) + self.group = self.env["res.groups"].create({"name": "Demo Group"}) + self.ir_access = self.env["ir.model.access"].create( { "name": "model access", - "model_id": cls.env.ref( + "model_id": self.env.ref( "edi_core_oca.model_edi_exchange_consumer_test" ).id, - "group_id": cls.group.id, + "group_id": self.group.id, "perm_read": True, "perm_write": True, "perm_create": True, "perm_unlink": True, } ) - cls.rule = cls.env["ir.rule"].create( + self.rule = self.env["ir.rule"].create( { "name": "Exchange Record rule demo", - "model_id": cls.env.ref( + "model_id": self.env.ref( "edi_core_oca.model_edi_exchange_consumer_test" ).id, "domain_force": "[('name', '=', 'test')]", - "groups": [(4, cls.group.id)], + "groups": [(4, self.group.id)], } ) - cls.user = ( - cls.env["res.users"] + self.user = ( + self.env["res.users"] .with_context(no_reset_password=True, mail_notrack=True) .create( { "name": "Poor Partner (not integrating one)", "email": "poor.partner@ododo.com", "login": "poorpartner", - "groups_id": [(6, 0, [cls.env.ref("base_edi.group_edi_user").id])], + "groups_id": [(6, 0, [self.env.ref("base_edi.group_edi_user").id])], } ) ) - cls.consumer_record = cls.env["edi.exchange.consumer.test"].create( + self.consumer_record = self.env["edi.exchange.consumer.test"].create( {"name": "test"} ) - cls.exchange_type_out.exchange_filename_pattern = "{record.id}" + self.exchange_type_out.exchange_filename_pattern = "{record.id}" - @classmethod - def tearDownClass(cls): - cls.loader.restore_registry() - super().tearDownClass() + def tearDown(self): + self.loader.restore_registry() + super().tearDown() def create_record(self, user=False): vals = { diff --git a/edi_exchange_template_oca/tests/test_edi_backend_output.py b/edi_exchange_template_oca/tests/test_edi_backend_output.py index 89a91bb37..117f170e4 100644 --- a/edi_exchange_template_oca/tests/test_edi_backend_output.py +++ b/edi_exchange_template_oca/tests/test_edi_backend_output.py @@ -242,13 +242,21 @@ def test_generate_file(self): self.assertEqual(file_content.strip(), expected) def test_prettify(self): - self.tmpl_out2.template_id.arch = ( + tmpl_out2 = self.env["edi.exchange.template.output"].browse(self.tmpl_out2.id) + record2 = self.env["edi.exchange.record"].browse(self.record2.id) + self.assertTrue( + tmpl_out2.exists(), "Template output record vanished during test execution" + ) + self.assertTrue( + record2.exists(), "Exchange record vanished during test execution" + ) + tmpl_out2.template_id.arch = ( '1' ) - output = self.tmpl_out2.exchange_generate(self.record2) + output = tmpl_out2.exchange_generate(record2) self.assertEqual(output, b"1") - self.tmpl_out2.prettify = True - output = self.tmpl_out2.exchange_generate(self.record2) + tmpl_out2.prettify = True + output = tmpl_out2.exchange_generate(record2) self.assertEqual(output, b"\n 1\n\n") def test_generate_file_report(self): diff --git a/edi_queue_oca/tests/test_backend_jobs.py b/edi_queue_oca/tests/test_backend_jobs.py index 6998d08eb..44c90eac7 100644 --- a/edi_queue_oca/tests/test_backend_jobs.py +++ b/edi_queue_oca/tests/test_backend_jobs.py @@ -20,25 +20,27 @@ class EDIBackendTestJobsCase(EDIBackendCommonTestCase, JobMixin): def _setup_context(cls): return dict(super()._setup_context(), queue_job__no_delay=None) - @classmethod - def _setup_records(cls): # pylint:disable=missing-return - super()._setup_records() - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() + def setUp(self): + super().setUp() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() from odoo.addons.edi_core_oca.tests.fake_models import EdiTestExecution - cls.loader.update_registry((EdiTestExecution,)) - cls.ExecutionAbstractModel = cls.env["edi.framework.test.execution"] - cls.model = cls.env["ir.model"].search( + self.loader.update_registry((EdiTestExecution,)) + self.ExecutionAbstractModel = self.env["edi.framework.test.execution"] + self.model = self.env["ir.model"].search( [("model", "=", "edi.framework.test.execution")] ) - cls.exchange_type_out.generate_model_id = cls.model - cls.exchange_type_out.send_model_id = cls.model - cls.exchange_type_out.output_validate_model_id = cls.model - cls.exchange_type_in.receive_model_id = cls.model - cls.exchange_type_in.process_model_id = cls.model - cls.exchange_type_in.input_validate_model_id = cls.model + self.exchange_type_out.generate_model_id = self.model + self.exchange_type_out.send_model_id = self.model + self.exchange_type_out.output_validate_model_id = self.model + self.exchange_type_in.receive_model_id = self.model + self.exchange_type_in.process_model_id = self.model + self.exchange_type_in.input_validate_model_id = self.model + + def tearDown(self): + self.loader.restore_registry() + super().tearDown() def _get_related_jobs(self, record): # Use domain in action to find all related jobs diff --git a/edi_record_metadata_oca/tests/test_metadata.py b/edi_record_metadata_oca/tests/test_metadata.py index 62144fe94..a29916863 100644 --- a/edi_record_metadata_oca/tests/test_metadata.py +++ b/edi_record_metadata_oca/tests/test_metadata.py @@ -10,29 +10,25 @@ class TestEDIMetadata(EDIBackendCommonTestCase): - @classmethod - def _setup_records(cls): - res = super()._setup_records() - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() + def setUp(self): + super().setUp() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() from .fake_models import EDIMetadataConsumerFake - cls.loader.update_registry((EDIMetadataConsumerFake,)) - cls.consumer_model = cls.env[EDIMetadataConsumerFake._name] + self.loader.update_registry((EDIMetadataConsumerFake,)) + self.consumer_model = self.env[EDIMetadataConsumerFake._name] - cls.exc_type = cls._create_exchange_type( + self.exc_type = self._create_exchange_type( name="Metadata test", code="metadata_test", direction="output", ) - cls.exc_record = cls.backend.create_record(cls.exc_type.code, {}) - return res + self.exc_record = self.backend.create_record(self.exc_type.code, {}) - @classmethod - def tearDownClass(cls): - cls.loader.restore_registry() - super().tearDownClass() + def tearDown(self): + self.loader.restore_registry() + super().tearDown() def test_fields(self): self.exc_record.set_metadata({"foo": "baz", "bar": "waa"}) diff --git a/edi_state_oca/tests/test_edi_state.py b/edi_state_oca/tests/test_edi_state.py index 08ba3ec56..55f719643 100644 --- a/edi_state_oca/tests/test_edi_state.py +++ b/edi_state_oca/tests/test_edi_state.py @@ -10,63 +10,59 @@ class TestEDIState(EDIBackendCommonTestCase): - @classmethod - def _setup_records(cls): - res = super()._setup_records() - # Load fake models ->/ - cls.loader = FakeModelLoader(cls.env, cls.__module__) - cls.loader.backup_registry() + def setUp(self): + super().setUp() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() from .fake_models import EDIStateConsumerFake - cls.loader.update_registry((EDIStateConsumerFake,)) - cls.consumer_model = cls.env[EDIStateConsumerFake._name] - cls.consumer_record = cls.consumer_model.create( + self.loader.update_registry((EDIStateConsumerFake,)) + self.consumer_model = self.env[EDIStateConsumerFake._name] + self.consumer_record = self.consumer_model.create( { "name": "State Test Consumer", } ) # Suitable workflow - cls.wf1_ok = cls.env["edi.state.workflow"].create( + self.wf1_ok = self.env["edi.state.workflow"].create( { "name": "WF1", - "backend_type_id": cls.backend.backend_type_id.id, - "model_id": cls.env["ir.model"]._get(cls.consumer_record._name).id, + "backend_type_id": self.backend.backend_type_id.id, + "model_id": self.env["ir.model"]._get(self.consumer_record._name).id, } ) for i in range(1, 4): - cls.env["edi.state"].create( - {"name": f"OK {i}", "code": f"OK_{i}", "workflow_id": cls.wf1_ok.id} + self.env["edi.state"].create( + {"name": f"OK {i}", "code": f"OK_{i}", "workflow_id": self.wf1_ok.id} ) # Non suitable workflow - cls.wf2_ko = cls.env["edi.state.workflow"].create( + self.wf2_ko = self.env["edi.state.workflow"].create( { "name": "WF2", - "backend_type_id": cls.backend.backend_type_id.id, - "model_id": cls.env["ir.model"]._get("res.partner").id, + "backend_type_id": self.backend.backend_type_id.id, + "model_id": self.env["ir.model"]._get("res.partner").id, } ) for i in range(1, 4): - cls.env["edi.state"].create( - {"name": f"KO {i}", "code": f"KO_{i}", "workflow_id": cls.wf2_ko.id} + self.env["edi.state"].create( + {"name": f"KO {i}", "code": f"KO_{i}", "workflow_id": self.wf2_ko.id} ) - cls.exc_type = cls._create_exchange_type( + self.exc_type = self._create_exchange_type( name="State test", code="state_test", direction="output", - state_workflow_ids=[(6, 0, cls.wf1_ok.ids)], + state_workflow_ids=[(6, 0, self.wf1_ok.ids)], ) vals = { - "model": cls.consumer_record._name, - "res_id": cls.consumer_record.id, + "model": self.consumer_record._name, + "res_id": self.consumer_record.id, } - record = cls.backend.create_record("state_test", vals) - cls.consumer_record._edi_set_origin(record) - return res + record = self.backend.create_record("state_test", vals) + self.consumer_record._edi_set_origin(record) - @classmethod - def tearDownClass(cls): - cls.loader.restore_registry() - super().tearDownClass() + def tearDown(self): + self.loader.restore_registry() + super().tearDown() def test_is_state_valid(self): self.assertTrue(self.wf1_ok.is_valid_for_model(self.consumer_model._name)) From b7ca2bc3e2744b1fe30ba811bfd15d609d748fe8 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 24 Feb 2026 09:05:06 +0000 Subject: [PATCH 014/145] [BOT] post-merge updates --- README.md | 12 ++++++------ edi_component_oca/README.rst | 2 +- edi_component_oca/__manifest__.py | 2 +- edi_component_oca/static/description/index.html | 2 +- edi_core_oca/README.rst | 2 +- edi_core_oca/__manifest__.py | 2 +- edi_core_oca/static/description/index.html | 2 +- edi_exchange_template_oca/README.rst | 2 +- edi_exchange_template_oca/__manifest__.py | 2 +- .../static/description/index.html | 2 +- edi_queue_oca/README.rst | 2 +- edi_queue_oca/__manifest__.py | 2 +- edi_queue_oca/static/description/index.html | 2 +- edi_record_metadata_oca/__manifest__.py | 2 +- edi_state_oca/README.rst | 2 +- edi_state_oca/__manifest__.py | 2 +- edi_state_oca/static/description/index.html | 2 +- 17 files changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 7ba24b384..4215364a4 100644 --- a/README.md +++ b/README.md @@ -23,22 +23,22 @@ addon | version | maintainers | summary --- | --- | --- | --- [edi_account_core_oca](edi_account_core_oca/) | 18.0.1.1.1 | etobella | Define EDI Configuration for Account Moves [edi_account_oca](edi_account_oca/) | 18.0.1.1.1 | etobella | Define some component listeners for Account Moves -[edi_component_oca](edi_component_oca/) | 18.0.1.0.2 | simahawk etobella | Allow to use Connector as a source in EDI -[edi_core_oca](edi_core_oca/) | 18.0.1.6.0 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. +[edi_component_oca](edi_component_oca/) | 18.0.1.0.3 | simahawk etobella | Allow to use Connector as a source in EDI +[edi_core_oca](edi_core_oca/) | 18.0.1.6.1 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. [edi_endpoint_oca](edi_endpoint_oca/) | 18.0.1.0.3 | | Base module allowing configuration of custom endpoints for EDI framework. -[edi_exchange_template_oca](edi_exchange_template_oca/) | 18.0.1.3.2 | simahawk | Allows definition of exchanges via templates. +[edi_exchange_template_oca](edi_exchange_template_oca/) | 18.0.1.3.3 | simahawk | Allows definition of exchanges via templates. [edi_exchange_template_party_data](edi_exchange_template_party_data/) | 18.0.1.0.1 | simahawk | Glue module between edi_exchange_template and edi_party_data [edi_oca](edi_oca/) | 18.0.1.5.2 | simahawk etobella | Integrate all EDI modules together [edi_party_data_oca](edi_party_data_oca/) | 18.0.1.0.1 | simahawk | Allow to configure and retrieve party information for EDI exchanges. -[edi_queue_oca](edi_queue_oca/) | 18.0.1.0.1 | | Set Queue Jobs on EDI -[edi_record_metadata_oca](edi_record_metadata_oca/) | 18.0.1.0.2 | simahawk | Allow to store metadata for related records. +[edi_queue_oca](edi_queue_oca/) | 18.0.1.0.2 | | Set Queue Jobs on EDI +[edi_record_metadata_oca](edi_record_metadata_oca/) | 18.0.1.0.3 | simahawk | Allow to store metadata for related records. [edi_sale_endpoint](edi_sale_endpoint/) | 18.0.1.0.0 | simahawk | Glue module between edi_sale_oca and edi_endpoint_oca. [edi_sale_input_oca](edi_sale_input_oca/) | 18.0.1.0.1 | simahawk | Process incoming sale orders with the EDI framework. [edi_sale_oca](edi_sale_oca/) | 18.0.1.0.1 | simahawk | Configuration and special behaviors for EDI on sales. [edi_sale_stock_oca](edi_sale_stock_oca/) | 18.0.1.0.0 | ivantodorovich | Configuration and special behaviors for EDI on sales & stock. [edi_sale_ubl_oca](edi_sale_ubl_oca/) | 18.0.1.0.2 | | Configuration and special behaviors for EDI UBL exchanges related to sales. [edi_sale_ubl_output_oca](edi_sale_ubl_output_oca/) | 18.0.1.0.1 | | Configuration and special behaviors for EDI on sales. -[edi_state_oca](edi_state_oca/) | 18.0.1.0.2 | simahawk | Allow to assign specific EDI states to related records. +[edi_state_oca](edi_state_oca/) | 18.0.1.0.3 | simahawk | Allow to assign specific EDI states to related records. [edi_stock_oca](edi_stock_oca/) | 18.0.1.0.1 | | Define EDI Configuration for Stock [edi_storage_oca](edi_storage_oca/) | 18.0.1.0.2 | | Base module to allow exchanging files via storage backend (eg: SFTP). [edi_storage_queue_oca](edi_storage_queue_oca/) | 18.0.1.0.0 | | Integrates EDI Storage with Queue diff --git a/edi_component_oca/README.rst b/edi_component_oca/README.rst index 8cd40f4f6..db2cffdd7 100644 --- a/edi_component_oca/README.rst +++ b/edi_component_oca/README.rst @@ -11,7 +11,7 @@ Edi Connector Oca !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:3bf081843ed5a121210f466d0a354fe495798e66f75d76f6958176548d647356 + !! source digest: sha256:81c11c0d670f363513d25e5d2d6cb038f1fc56580f20c837c2d2a7665798018d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/edi_component_oca/__manifest__.py b/edi_component_oca/__manifest__.py index 245d468d5..fa8111718 100644 --- a/edi_component_oca/__manifest__.py +++ b/edi_component_oca/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Edi Connector Oca", "summary": """Allow to use Connector as a source in EDI""", - "version": "18.0.1.0.2", + "version": "18.0.1.0.3", "license": "LGPL-3", "author": "ACSONE,Dixmit,Camptocamp,Odoo Community Association (OCA)", "maintainers": ["simahawk", "etobella"], diff --git a/edi_component_oca/static/description/index.html b/edi_component_oca/static/description/index.html index b82405afa..e6128b6fa 100644 --- a/edi_component_oca/static/description/index.html +++ b/edi_component_oca/static/description/index.html @@ -372,7 +372,7 @@

Edi Connector Oca

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:3bf081843ed5a121210f466d0a354fe495798e66f75d76f6958176548d647356 +!! source digest: sha256:81c11c0d670f363513d25e5d2d6cb038f1fc56580f20c837c2d2a7665798018d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

This module allows to use components to handle code to execute on EDI diff --git a/edi_core_oca/README.rst b/edi_core_oca/README.rst index 4e3f221be..c9d20457e 100644 --- a/edi_core_oca/README.rst +++ b/edi_core_oca/README.rst @@ -11,7 +11,7 @@ EDI !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:1949f87b78e227c0b7d68a4b8967de8fc28a273125c228aad2d3a906b10923d8 + !! source digest: sha256:95302609a43b47d26df26c7943e10d1f31b7d4ca39df3de4bb8d7a5e345890fc !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/edi_core_oca/__manifest__.py b/edi_core_oca/__manifest__.py index a4e8ff8b9..9598d843d 100644 --- a/edi_core_oca/__manifest__.py +++ b/edi_core_oca/__manifest__.py @@ -9,7 +9,7 @@ Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. """, - "version": "18.0.1.6.0", + "version": "18.0.1.6.1", "website": "https://github.com/OCA/edi-framework", "development_status": "Beta", "license": "LGPL-3", diff --git a/edi_core_oca/static/description/index.html b/edi_core_oca/static/description/index.html index a946bb227..fdf943e75 100644 --- a/edi_core_oca/static/description/index.html +++ b/edi_core_oca/static/description/index.html @@ -372,7 +372,7 @@

EDI

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:1949f87b78e227c0b7d68a4b8967de8fc28a273125c228aad2d3a906b10923d8 +!! source digest: sha256:95302609a43b47d26df26c7943e10d1f31b7d4ca39df3de4bb8d7a5e345890fc !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

Base EDI backend.

diff --git a/edi_exchange_template_oca/README.rst b/edi_exchange_template_oca/README.rst index b93ec5437..be1ecdf9a 100644 --- a/edi_exchange_template_oca/README.rst +++ b/edi_exchange_template_oca/README.rst @@ -11,7 +11,7 @@ EDI Exchange Template !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:ebed0a953bbe9571fc02c722ad850e26c3af87cf9ee52fd7f496048a102717ec + !! source digest: sha256:c6b98455272323462e208761ef6f68cff26fd2e6f561245ef60fe8af4fe329e8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/edi_exchange_template_oca/__manifest__.py b/edi_exchange_template_oca/__manifest__.py index e1d3d5fbc..11190f20a 100644 --- a/edi_exchange_template_oca/__manifest__.py +++ b/edi_exchange_template_oca/__manifest__.py @@ -5,7 +5,7 @@ { "name": "EDI Exchange Template", "summary": """Allows definition of exchanges via templates.""", - "version": "18.0.1.3.2", + "version": "18.0.1.3.3", "development_status": "Beta", "license": "LGPL-3", "author": "ACSONE,Camptocamp,Odoo Community Association (OCA)", diff --git a/edi_exchange_template_oca/static/description/index.html b/edi_exchange_template_oca/static/description/index.html index c072c6345..664d6c0b7 100644 --- a/edi_exchange_template_oca/static/description/index.html +++ b/edi_exchange_template_oca/static/description/index.html @@ -372,7 +372,7 @@

EDI Exchange Template

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:ebed0a953bbe9571fc02c722ad850e26c3af87cf9ee52fd7f496048a102717ec +!! source digest: sha256:c6b98455272323462e208761ef6f68cff26fd2e6f561245ef60fe8af4fe329e8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

Provide EDI exchange templates to control input/output records contents.

diff --git a/edi_queue_oca/README.rst b/edi_queue_oca/README.rst index 4f0005b07..c9b6f4945 100644 --- a/edi_queue_oca/README.rst +++ b/edi_queue_oca/README.rst @@ -11,7 +11,7 @@ Edi Queue Oca !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:e3afeef7814c93bbb02342bbea9a025fdac06fcbf906dcc4eb2b221aa4757a1e + !! source digest: sha256:273ae337ce810a27ea20810513190a340066e443fdb5d1b3d00065665bf8c6aa !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/edi_queue_oca/__manifest__.py b/edi_queue_oca/__manifest__.py index 28121311c..dec27cca5 100644 --- a/edi_queue_oca/__manifest__.py +++ b/edi_queue_oca/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Edi Queue Oca", "summary": """Set Queue Jobs on EDI""", - "version": "18.0.1.0.1", + "version": "18.0.1.0.2", "license": "LGPL-3", "author": "Dixmit,Camptocamp,Odoo Community Association (OCA)", "website": "https://github.com/OCA/edi-framework", diff --git a/edi_queue_oca/static/description/index.html b/edi_queue_oca/static/description/index.html index 94c3d5675..c65aff333 100644 --- a/edi_queue_oca/static/description/index.html +++ b/edi_queue_oca/static/description/index.html @@ -372,7 +372,7 @@

Edi Queue Oca

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:e3afeef7814c93bbb02342bbea9a025fdac06fcbf906dcc4eb2b221aa4757a1e +!! source digest: sha256:273ae337ce810a27ea20810513190a340066e443fdb5d1b3d00065665bf8c6aa !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

This module integrates EDI with Queue Job and now the edi exchange diff --git a/edi_record_metadata_oca/__manifest__.py b/edi_record_metadata_oca/__manifest__.py index 9b162ace3..68e7b8631 100644 --- a/edi_record_metadata_oca/__manifest__.py +++ b/edi_record_metadata_oca/__manifest__.py @@ -7,7 +7,7 @@ "summary": """ Allow to store metadata for related records. """, - "version": "18.0.1.0.2", + "version": "18.0.1.0.3", "development_status": "Alpha", "license": "LGPL-3", "website": "https://github.com/OCA/edi-framework", diff --git a/edi_state_oca/README.rst b/edi_state_oca/README.rst index 21e8056ad..62956dee6 100644 --- a/edi_state_oca/README.rst +++ b/edi_state_oca/README.rst @@ -11,7 +11,7 @@ EDI state !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:b94605243de3a33cc1d60443e16739b5e3c1a135859aab0b21154ff1173e1f0a + !! source digest: sha256:e8a144d5155e42c0155d565988d9fecd87ed66b45db2090a072b8829eab6ab34 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png diff --git a/edi_state_oca/__manifest__.py b/edi_state_oca/__manifest__.py index 51e33f736..2fc7bf39e 100644 --- a/edi_state_oca/__manifest__.py +++ b/edi_state_oca/__manifest__.py @@ -7,7 +7,7 @@ "summary": """ Allow to assign specific EDI states to related records. """, - "version": "18.0.1.0.2", + "version": "18.0.1.0.3", "development_status": "Alpha", "license": "LGPL-3", "website": "https://github.com/OCA/edi-framework", diff --git a/edi_state_oca/static/description/index.html b/edi_state_oca/static/description/index.html index efa1a7a75..20ea1443b 100644 --- a/edi_state_oca/static/description/index.html +++ b/edi_state_oca/static/description/index.html @@ -372,7 +372,7 @@

EDI state

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:b94605243de3a33cc1d60443e16739b5e3c1a135859aab0b21154ff1173e1f0a +!! source digest: sha256:e8a144d5155e42c0155d565988d9fecd87ed66b45db2090a072b8829eab6ab34 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Alpha License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

Technical module for the EDI suite to provide additional states for any From b42ba0aea8c9e1891832dc9e79a4a71a0a8b06fe Mon Sep 17 00:00:00 2001 From: Ricardoalso Date: Mon, 23 Feb 2026 09:53:48 +0100 Subject: [PATCH 015/145] [FIX] edi_core_oca: handle OperationalError and IntegrityError exceptions to prevent finally block execution in aborted transaction state --- edi_core_oca/models/edi_backend.py | 83 ++++++++++++++-------- edi_core_oca/tests/test_backend_input.py | 10 +++ edi_core_oca/tests/test_backend_output.py | 11 +++ edi_core_oca/tests/test_backend_process.py | 10 +++ 4 files changed, 84 insertions(+), 30 deletions(-) diff --git a/edi_core_oca/models/edi_backend.py b/edi_core_oca/models/edi_backend.py index 47d9c3db7..e7aa9b968 100644 --- a/edi_core_oca/models/edi_backend.py +++ b/edi_core_oca/models/edi_backend.py @@ -10,6 +10,8 @@ import traceback from io import StringIO +from psycopg2 import IntegrityError, OperationalError + from odoo import exceptions, fields, models from odoo.exceptions import UserError @@ -237,6 +239,11 @@ def exchange_send(self, exchange_record): _logger.debug( "%s send failed. Marked as errored.", exchange_record.identifier ) + except (OperationalError, IntegrityError): + # We don't want the finally block to be executed in this case as + # the cursor is already in an aborted state and any query will fail. + res = "__sql_error__" + raise else: # TODO: maybe the send handler should return desired message and state message = exchange_record._exchange_status_message("send_ok") @@ -248,16 +255,18 @@ def exchange_send(self, exchange_record): ) res = message finally: - exchange_record.write( - { - "edi_exchange_state": state, - "exchange_error": error, - "exchange_error_traceback": traceback, - # FIXME: this should come from _compute_exchanged_on - # but somehow it's failing in send tests (in record tests it works). - "exchanged_on": fields.Datetime.now(), - } - ) + if res != "__sql_error__": + exchange_record.write( + { + "edi_exchange_state": state, + "exchange_error": error, + "exchange_error_traceback": traceback, + # FIXME: this should come from _compute_exchanged_on + # but somehow it's failing in send tests + # (in record tests it works). + "exchanged_on": fields.Datetime.now(), + } + ) exchange_record.notify_action_complete("send", message=message) return res @@ -445,20 +454,27 @@ def exchange_process(self, exchange_record): error = _get_exception_msg(err) state = "input_processed_error" res = f"Error: {error}" + except (OperationalError, IntegrityError): + # We don't want the finally block to be executed in this case as + # the cursor is already in an aborted state and any query will fail. + res = "__sql_error__" + raise else: error = traceback = None state = "input_processed" finally: - exchange_record.write( - { - "edi_exchange_state": state, - "exchange_error": error, - "exchange_error_traceback": traceback, - # FIXME: this should come from _compute_exchanged_on - # but somehow it's failing in send tests (in record tests it works). - "exchanged_on": fields.Datetime.now(), - } - ) + if res != "__sql_error__": + exchange_record.write( + { + "edi_exchange_state": state, + "exchange_error": error, + "exchange_error_traceback": traceback, + # FIXME: this should come from _compute_exchanged_on + # but somehow it's failing in send tests + # (in record tests it works). + "exchanged_on": fields.Datetime.now(), + } + ) if ( state == "input_processed_error" and old_state != "input_processed_error" @@ -506,22 +522,29 @@ def exchange_receive(self, exchange_record): state = "input_receive_error" message = exchange_record._exchange_status_message("receive_ko") res = f"Input error: {error}" + except (OperationalError, IntegrityError): + # We don't want the finally block to be executed in this case as + # the cursor is already in an aborted state and any query will fail. + res = "__sql_error__" + raise else: message = exchange_record._exchange_status_message("receive_ok") error = traceback = None state = "input_received" res = message finally: - exchange_record.write( - { - "edi_exchange_state": state, - "exchange_error": error, - "exchange_error_traceback": traceback, - # FIXME: this should come from _compute_exchanged_on - # but somehow it's failing in send tests (in record tests it works). - "exchanged_on": fields.Datetime.now(), - } - ) + if res != "__sql_error__": + exchange_record.write( + { + "edi_exchange_state": state, + "exchange_error": error, + "exchange_error_traceback": traceback, + # FIXME: this should come from _compute_exchanged_on + # but somehow it's failing in send tests + # (in record tests it works). + "exchanged_on": fields.Datetime.now(), + } + ) exchange_record.notify_action_complete("receive", message=message) return res diff --git a/edi_core_oca/tests/test_backend_input.py b/edi_core_oca/tests/test_backend_input.py index 89d7fe13f..0ca5e2e5b 100644 --- a/edi_core_oca/tests/test_backend_input.py +++ b/edi_core_oca/tests/test_backend_input.py @@ -3,6 +3,7 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). from odoo_test_helper import FakeModelLoader +from psycopg2 import OperationalError from .common import EDIBackendCommonTestCase @@ -78,3 +79,12 @@ def test_receive_allow_empty_file_record(self): # Check the record self.assertEqual(self.record._get_file_content(), "") self.assertRecordValues(self.record, [{"edi_exchange_state": "input_received"}]) + + def test_receive_record_with_operational_error(self): + self.record.edi_exchange_state = "input_pending" + with self.assertRaises(OperationalError): + self.backend.with_context( + test_break_receive=OperationalError("SQL error") + ).exchange_receive(self.record) + self.assertRecordValues(self.record, [{"edi_exchange_state": "input_pending"}]) + self.assertFalse(self.record.exchange_error) diff --git a/edi_core_oca/tests/test_backend_output.py b/edi_core_oca/tests/test_backend_output.py index 69bd07fe8..2d5e49810 100644 --- a/edi_core_oca/tests/test_backend_output.py +++ b/edi_core_oca/tests/test_backend_output.py @@ -7,6 +7,7 @@ from freezegun import freeze_time from odoo_test_helper import FakeModelLoader +from psycopg2 import OperationalError from odoo import fields, tools from odoo.exceptions import UserError @@ -122,3 +123,13 @@ def test_send_not_generated_record(self): err.exception.args[0], "Record ID=%d has no file to send!" % record.id ) mocked.assert_not_called() + + def test_send_record_with_operational_error(self): + self.record.write({"edi_exchange_state": "output_pending"}) + self.record._set_file_content("TEST %d" % self.record.id) + with self.assertRaises(OperationalError): + self.backend.with_context( + test_break_send=OperationalError("SQL error") + ).exchange_send(self.record) + self.assertRecordValues(self.record, [{"edi_exchange_state": "output_pending"}]) + self.assertFalse(self.record.exchange_error) diff --git a/edi_core_oca/tests/test_backend_process.py b/edi_core_oca/tests/test_backend_process.py index 913abfb6d..de259115e 100644 --- a/edi_core_oca/tests/test_backend_process.py +++ b/edi_core_oca/tests/test_backend_process.py @@ -6,6 +6,7 @@ from freezegun import freeze_time from odoo_test_helper import FakeModelLoader +from psycopg2 import IntegrityError from odoo import fields from odoo.exceptions import UserError @@ -103,4 +104,13 @@ def test_process_outbound_record(self): with self.assertRaises(UserError): record.action_exchange_process() + def test_process_record_with_integrity_error(self): + self.record.write({"edi_exchange_state": "input_received"}) + with self.assertRaises(IntegrityError): + self.backend.with_context( + test_break_process=IntegrityError("SQL error") + ).exchange_process(self.record) + self.assertRecordValues(self.record, [{"edi_exchange_state": "input_received"}]) + self.assertFalse(self.record.exchange_error) + # TODO: test ack file are processed From 6cac137865ca6df6400cd6e32aa8cf746fb51d5f Mon Sep 17 00:00:00 2001 From: OriolMForgeFlow Date: Wed, 29 Nov 2023 10:09:29 +0100 Subject: [PATCH 016/145] [ADD] edi_product_oca --- edi_product_oca/README.rst | 76 ++++ edi_product_oca/__init__.py | 1 + edi_product_oca/__manifest__.py | 17 + edi_product_oca/i18n/edi_product_oca.pot | 83 ++++ edi_product_oca/models/__init__.py | 2 + edi_product_oca/models/product_product.py | 9 + edi_product_oca/models/product_template.py | 9 + edi_product_oca/readme/CONTRIBUTORS.rst | 1 + edi_product_oca/readme/DESCRIPTION.rst | 1 + edi_product_oca/static/description/icon.png | Bin 0 -> 9455 bytes edi_product_oca/static/description/index.html | 421 ++++++++++++++++++ edi_product_oca/views/product_views.xml | 35 ++ 12 files changed, 655 insertions(+) create mode 100644 edi_product_oca/README.rst create mode 100644 edi_product_oca/__init__.py create mode 100644 edi_product_oca/__manifest__.py create mode 100644 edi_product_oca/i18n/edi_product_oca.pot create mode 100644 edi_product_oca/models/__init__.py create mode 100644 edi_product_oca/models/product_product.py create mode 100644 edi_product_oca/models/product_template.py create mode 100644 edi_product_oca/readme/CONTRIBUTORS.rst create mode 100644 edi_product_oca/readme/DESCRIPTION.rst create mode 100644 edi_product_oca/static/description/icon.png create mode 100644 edi_product_oca/static/description/index.html create mode 100644 edi_product_oca/views/product_views.xml diff --git a/edi_product_oca/README.rst b/edi_product_oca/README.rst new file mode 100644 index 000000000..610a8a487 --- /dev/null +++ b/edi_product_oca/README.rst @@ -0,0 +1,76 @@ +=========== +EDI Product +=========== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:9eb0e9359e040d5f63d6af40d6aeaaa5f9f04450c7fa6cc4a65b8000ba2c1057 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi--framework-lightgray.png?logo=github + :target: https://github.com/OCA/edi-framework/tree/16.0/edi_product_oca + :alt: OCA/edi-framework +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/edi-framework-16-0/edi-framework-16-0-edi_product_oca + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Provide basic configuration for products with EDI framework. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* ForgeFlow + +Contributors +~~~~~~~~~~~~ + +* Oriol Miranda + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/edi-framework `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/edi_product_oca/__init__.py b/edi_product_oca/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/edi_product_oca/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/edi_product_oca/__manifest__.py b/edi_product_oca/__manifest__.py new file mode 100644 index 000000000..53b8b46a5 --- /dev/null +++ b/edi_product_oca/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2023 ForgeFlow S.L. (http://www.forgeflow.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "EDI Product", + "summary": """ + EDI framework configuration and base logic for products""", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "author": "ForgeFlow, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/edi-framework", + "depends": [ + "product", + "edi_oca", + ], + "data": ["views/product_views.xml"], +} diff --git a/edi_product_oca/i18n/edi_product_oca.pot b/edi_product_oca/i18n/edi_product_oca.pot new file mode 100644 index 000000000..ad2ba93ee --- /dev/null +++ b/edi_product_oca/i18n/edi_product_oca.pot @@ -0,0 +1,83 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * edi_product_oca +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__edi_disable_auto +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__edi_disable_auto +msgid "Disable auto" +msgstr "" + +#. module: edi_product_oca +#: model_terms:ir.ui.view,arch_db:edi_product_oca.product_template_form_view +msgid "EDI" +msgstr "" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__origin_exchange_type_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__origin_exchange_type_id +msgid "EDI origin exchange type" +msgstr "" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__origin_exchange_record_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__origin_exchange_record_id +msgid "EDI origin record" +msgstr "" + +#. module: edi_product_oca +#: model:ir.model.fields,help:edi_product_oca.field_product_product__origin_exchange_record_id +#: model:ir.model.fields,help:edi_product_oca.field_product_template__origin_exchange_record_id +msgid "EDI record that originated this document." +msgstr "" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__edi_config +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__edi_config +msgid "Edi Config" +msgstr "" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__edi_has_form_config +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__edi_has_form_config +msgid "Edi Has Form Config" +msgstr "" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__exchange_record_ids +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__exchange_record_ids +msgid "Exchange Record" +msgstr "" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__exchange_record_count +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__exchange_record_count +msgid "Exchange Record Count" +msgstr "" + +#. module: edi_product_oca +#: model:ir.model,name:edi_product_oca.model_product_template +msgid "Product" +msgstr "" + +#. module: edi_product_oca +#: model:ir.model,name:edi_product_oca.model_product_product +msgid "Product Variant" +msgstr "" + +#. module: edi_product_oca +#: model:ir.model.fields,help:edi_product_oca.field_product_product__edi_disable_auto +#: model:ir.model.fields,help:edi_product_oca.field_product_template__edi_disable_auto +msgid "When marked, EDI automatic processing will be avoided" +msgstr "" diff --git a/edi_product_oca/models/__init__.py b/edi_product_oca/models/__init__.py new file mode 100644 index 000000000..18b37e853 --- /dev/null +++ b/edi_product_oca/models/__init__.py @@ -0,0 +1,2 @@ +from . import product_product +from . import product_template diff --git a/edi_product_oca/models/product_product.py b/edi_product_oca/models/product_product.py new file mode 100644 index 000000000..a411f920b --- /dev/null +++ b/edi_product_oca/models/product_product.py @@ -0,0 +1,9 @@ +# Copyright 2023 ForgeFlow S.L. (http://www.forgeflow.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class ProductProduct(models.Model): + _name = "product.product" + _inherit = ["product.product", "edi.exchange.consumer.mixin"] diff --git a/edi_product_oca/models/product_template.py b/edi_product_oca/models/product_template.py new file mode 100644 index 000000000..ade61d91f --- /dev/null +++ b/edi_product_oca/models/product_template.py @@ -0,0 +1,9 @@ +# Copyright 2023 ForgeFlow S.L. (http://www.forgeflow.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class ProductTemplate(models.Model): + _name = "product.template" + _inherit = ["product.template", "edi.exchange.consumer.mixin"] diff --git a/edi_product_oca/readme/CONTRIBUTORS.rst b/edi_product_oca/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..f63a57cf5 --- /dev/null +++ b/edi_product_oca/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Oriol Miranda diff --git a/edi_product_oca/readme/DESCRIPTION.rst b/edi_product_oca/readme/DESCRIPTION.rst new file mode 100644 index 000000000..42019c0ed --- /dev/null +++ b/edi_product_oca/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +Provide basic configuration for products with EDI framework. diff --git a/edi_product_oca/static/description/icon.png b/edi_product_oca/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2&DmGFW_9kP&%?X4}+xWi)( z;)z%wI5>D4a*5XwD)P--sPkoY(a~WBw;E~AW`Yue4kFa^LM3X`8x|}ZUeMnqr}>kH zG%WWW>3ml$Yez?i%)2pbKPI7?5o?hydokgQyZsNEr{a|mLdt;X2TX(#B1j35xPnPW z*bMSSOauW>o;*=kO8ojw91VX!qoOQb)zHJ!odWB}d+*K?#sY_jqPdg{Sm2HdYzdEx zOGVPhVRTGPtv0o}RfVP;Nd(|CB)I;*t&QO8h zFfekr30S!-LHmV_Su-W+rEwYXJ^;6&3|L$mMC8*bQptyOo9;>Qb9Q9`ySe3%V$A*9 zeKEe+b0{#KWGp$F+tga)0RtI)nhMa-K@JS}2krK~n8vJ=Ngm?R!9G<~RyuU0d?nz# z-5EK$o(!F?hmX*2Yt6+coY`6jGbb7tF#6nHA zuKk=GGJ;ZwON1iAfG$E#Y7MnZVmrY|j0eVI(DN_MNFJmyZ|;w4tf@=CCDZ#5N_0K= z$;R~bbk?}TpfDjfB&aiQ$VA}s?P}xPERJG{kxk5~R`iRS(SK5d+Xs9swCozZISbnS zk!)I0>t=A<-^z(cmSFz3=jZ23u13X><0b)P)^1T_))Kr`e!-pb#q&J*Q`p+B6la%C zuVl&0duN<;uOsB3%T9Fp8t{ED108<+W(nOZd?gDnfNBC3>M8WE61$So|P zVvqH0SNtDTcsUdzaMDpT=Ty0pDHHNL@Z0w$Y`XO z2M-_r1S+GaH%pz#Uy0*w$Vdl=X=rQXEzO}d6J^R6zjM1u&c9vYLvLp?W7w(?np9x1 zE_0JSAJCPB%i7p*Wvg)pn5T`8k3-uR?*NT|J`eS#_#54p>!p(mLDvmc-3o0mX*mp_ zN*AeS<>#^-{S%W<*mz^!X$w_2dHWpcJ6^j64qFBft-o}o_Vx80o0>}Du;>kLts;$8 zC`7q$QI(dKYG`Wa8#wl@V4jVWBRGQ@1dr-hstpQL)Tl+aqVpGpbSfN>5i&QMXfiZ> zaA?T1VGe?rpQ@;+pkrVdd{klI&jVS@I5_iz!=UMpTsa~mBga?1r}aRBm1WS;TT*s0f0lY=JBl66Upy)-k4J}lh=P^8(SXk~0xW=T9v*B|gzIhN z>qsO7dFd~mgxAy4V?&)=5ieYq?zi?ZEoj)&2o)RLy=@hbCRcfT5jigwtQGE{L*8<@Yd{zg;CsL5mvzfDY}P-wos_6PfprFVaeqNE%h zKZhLtcQld;ZD+>=nqN~>GvROfueSzJD&BE*}XfU|H&(FssBqY=hPCt`d zH?@s2>I(|;fcW&YM6#V#!kUIP8$Nkdh0A(bEVj``-AAyYgwY~jB zT|I7Bf@%;7aL7Wf4dZ%VqF$eiaC38OV6oy3Z#TER2G+fOCd9Iaoy6aLYbPTN{XRPz z;U!V|vBf%H!}52L2gH_+j;`bTcQRXB+y9onc^wLm5wi3-Be}U>k_u>2Eg$=k!(l@I zcCg+flakT2Nej3i0yn+g+}%NYb?ta;R?(g5SnwsQ49U8Wng8d|{B+lyRcEDvR3+`O{zfmrmvFrL6acVP%yG98X zo&+VBg@px@i)%o?dG(`T;n*$S5*rnyiR#=wW}}GsAcfyQpE|>a{=$Hjg=-*_K;UtD z#z-)AXwSRY?OPefw^iI+ z)AXz#PfEjlwTes|_{sB?4(O@fg0AJ^g8gP}ex9Ucf*@_^J(s_5jJV}c)s$`Myn|Kd z$6>}#q^n{4vN@+Os$m7KV+`}c%4)4pv@06af4-x5#wj!KKb%caK{A&Y#Rfs z-po?Dcb1({W=6FKIUirH&(yg=*6aLCekcKwyfK^JN5{wcA3nhO(o}SK#!CINhI`-I z1)6&n7O&ZmyFMuNwvEic#IiOAwNkR=u5it{B9n2sAJV5pNhar=j5`*N!Na;c7g!l$ z3aYBqUkqqTJ=Re-;)s!EOeij=7SQZ3Hq}ZRds%IM*PtM$wV z@;rlc*NRK7i3y5BETSKuumEN`Xu_8GP1Ri=OKQ$@I^ko8>H6)4rjiG5{VBM>B|%`&&s^)jS|-_95&yc=GqjNo{zFkw%%HHhS~e=s zD#sfS+-?*t|J!+ozP6KvtOl!R)@@-z24}`9{QaVLD^9VCSR2b`b!KC#o;Ki<+wXB6 zx3&O0LOWcg4&rv4QG0)4yb}7BFSEg~=IR5#ZRj8kg}dS7_V&^%#Do==#`u zpy6{ox?jWuR(;pg+f@mT>#HGWHAJRRDDDv~@(IDw&R>9643kK#HN`!1vBJHnC+RM&yIh8{gG2q zA%e*U3|N0XSRa~oX-3EAneep)@{h2vvd3Xvy$7og(sayr@95+e6~Xvi1tUqnIxoIH zVWo*OwYElb#uyW{Imam6f2rGbjR!Y3`#gPqkv57dB6K^wRGxc9B(t|aYDGS=m$&S!NmCtrMMaUg(c zc2qC=2Z`EEFMW-me5B)24AqF*bV5Dr-M5ig(l-WPS%CgaPzs6p_gnCIvTJ=Y<6!gT zVt@AfYCzjjsMEGi=rDQHo0yc;HqoRNnNFeWZgcm?f;cp(6CNylj36DoL(?TS7eU#+ z7&mfr#y))+CJOXQKUMZ7QIdS9@#-}7y2K1{8)cCt0~-X0O!O?Qx#E4Og+;A2SjalQ zs7r?qn0H044=sDN$SRG$arw~n=+T_DNdSrarmu)V6@|?1-ZB#hRn`uilTGPJ@fqEy zGt(f0B+^JDP&f=r{#Y_wi#AVDf-y!RIXU^0jXsFpf>=Ji*TeqSY!H~AMbJdCGLhC) zn7Rx+sXw6uYj;WRYrLd^5IZq@6JI1C^YkgnedZEYy<&4(z%Q$5yv#Boo{AH8n$a zhb4Y3PWdr269&?V%uI$xMcUrMzl=;w<_nm*qr=c3Rl@i5wWB;e-`t7D&c-mcQl7x! zZWB`UGcw=Y2=}~wzrfLx=uet<;m3~=8I~ZRuzvMQUQdr+yTV|ATf1Uuomr__nDf=X zZ3WYJtHp_ri(}SQAPjv+Y+0=fH4krOP@S&=zZ-t1jW1o@}z;xk8 z(Nz1co&El^HK^NrhVHa-_;&88vTU>_J33=%{if;BEY*J#1n59=07jrGQ#IP>@u#3A z;!q+E1Rj3ZJ+!4bq9F8PXJ@yMgZL;>&gYA0%_Kbi8?S=XGM~dnQZQ!yBSgcZhY96H zrWnU;k)qy`rX&&xlDyA%(a1Hhi5CWkmg(`Gb%m(HKi-7Z!LKGRP_B8@`7&hdDy5n= z`OIxqxiVfX@OX1p(mQu>0Ai*v_cTMiw4qRt3~NBvr9oBy0)r>w3p~V0SCm=An6@3n)>@z!|o-$HvDK z|3D2ZMJkLE5loMKl6R^ez@Zz%S$&mbeoqH5`Bb){Ei21q&VP)hWS2tjShfFtGE+$z zzCR$P#uktu+#!w)cX!lWN1XU%K-r=s{|j?)Akf@q#3b#{6cZCuJ~gCxuMXRmI$nGtnH+-h z+GEi!*X=AP<|fG`1>MBdTb?28JYc=fGvAi2I<$B(rs$;eoJCyR6_bc~p!XR@O-+sD z=eH`-ye})I5ic1eL~TDmtfJ|8`0VJ*Yr=hNCd)G1p2MMz4C3^Mj?7;!w|Ly%JqmuW zlIEW^Ft%z?*|fpXda>Jr^1noFZEwFgVV%|*XhH@acv8rdGxeEX{M$(vG{Zw+x(ei@ zmfXb22}8-?Fi`vo-YVrTH*C?a8%M=Hv9MqVH7H^J$KsD?>!SFZ;ZsvnHr_gn=7acz z#W?0eCdVhVMWN12VV^$>WlQ?f;P^{(&pYTops|btm6aj>_Uz+hqpGwB)vWp0Cf5y< zft8-je~nn?W11plq}N)4A{l8I7$!ks_x$PXW-2XaRFswX_BnF{R#6YIwMhAgd5F9X zGmwdadS6(a^fjHtXg8=l?Rc0Sm%hk6E9!5cLVloEy4eh(=FwgP`)~I^5~pBEWo+F6 zSf2ncyMurJN91#cJTy_u8Y}@%!bq1RkGC~-bV@SXRd4F{R-*V`bS+6;W5vZ(&+I<9$;-V|eNfLa5n-6% z2(}&uGRF;p92eS*sE*oR$@pexaqr*meB)VhmIg@h{uzkk$9~qh#cHhw#>O%)b@+(| z^IQgqzuj~Sk(J;swEM-3TrJAPCq9k^^^`q{IItKBRXYe}e0Tdr=Huf7da3$l4PdpwWDop%^}n;dD#K4s#DYA8SHZ z&1!riV4W4R7R#C))JH1~axJ)RYnM$$lIR%6fIVA@zV{XVyx}C+a-Dt8Y9M)^KU0+H zR4IUb2CJ{Hg>CuaXtD50jB(_Tcx=Z$^WYu2u5kubqmwp%drJ6 z?Fo40g!Qd<-l=TQxqHEOuPX0;^z7iX?Ke^a%XT<13TA^5`4Xcw6D@Ur&VT&CUe0d} z1GjOVF1^L@>O)l@?bD~$wzgf(nxX1OGD8fEV?TdJcZc2KoUe|oP1#=$$7ee|xbY)A zDZq+cuTpc(fFdj^=!;{k03C69lMQ(|>uhRfRu%+!k&YOi-3|1QKB z z?n?eq1XP>p-IM$Z^C;2L3itnbJZAip*Zo0aw2bs8@(s^~*8T9go!%dHcAz2lM;`yp zD=7&xjFV$S&5uDaiScyD?B-i1ze`+CoRtz`Wn+Zl&#s4&}MO{@N!ufrzjG$B79)Y2d3tBk&)TxUTw@QS0TEL_?njX|@vq?Uz(nBFK5Pq7*xj#u*R&i|?7+6# z+|r_n#SW&LXhtheZdah{ZVoqwyT{D>MC3nkFF#N)xLi{p7J1jXlmVeb;cP5?e(=f# zuT7fvjSbjS781v?7{)-X3*?>tq?)Yd)~|1{BDS(pqC zC}~H#WXlkUW*H5CDOo<)#x7%RY)A;ShGhI5s*#cRDA8YgqG(HeKDx+#(ZQ?386dv! zlXCO)w91~Vw4AmOcATuV653fa9R$fyK8ul%rG z-wfS zihugoZyr38Im?Zuh6@RcF~t1anQu7>#lPpb#}4cOA!EM11`%f*07RqOVkmX{p~KJ9 z^zP;K#|)$`^Rb{rnHGH{~>1(fawV0*Z#)}M`m8-?ZJV<+e}s9wE# z)l&az?w^5{)`S(%MRzxdNqrs1n*-=jS^_jqE*5XDrA0+VE`5^*p3CuM<&dZEeCjoz zR;uu_H9ZPZV|fQq`Cyw4nscrVwi!fE6ciMmX$!_hN7uF;jjKG)d2@aC4ropY)8etW=xJvni)8eHi`H$%#zn^WJ5NLc-rqk|u&&4Z6fD_m&JfSI1Bvb?b<*n&sfl0^t z=HnmRl`XrFvMKB%9}>PaA`m-fK6a0(8=qPkWS5bb4=v?XcWi&hRY?O5HdulRi4?fN zlsJ*N-0Qw+Yic@s0(2uy%F@ib;GjXt01Fmx5XbRo6+n|pP(&nodMoap^z{~q ziEeaUT@Mxe3vJSfI6?uLND(CNr=#^W<1b}jzW58bIfyWTDle$mmS(|x-0|2UlX+9k zQ^EX7Nw}?EzVoBfT(-LT|=9N@^hcn-_p&sqG z&*oVs2JSU+N4ZD`FhCAWaS;>|wH2G*Id|?pa#@>tyxX`+4HyIArWDvVrX)2WAOQff z0qyHu&-S@i^MS-+j--!pr4fPBj~_8({~e1bfcl0wI1kaoN>mJL6KUPQm5N7lB(ui1 zE-o%kq)&djzWJ}ob<-GfDlkB;F31j-VHKvQUGQ3sp`CwyGJk_i!y^sD0fqC@$9|jO zOqN!r!8-p==F@ZVP=U$qSpY(gQ0)59P1&t@y?5rvg<}E+GB}26NYPp4f2YFQrQtot5mn3wu_qprZ=>Ig-$ zbW26Ws~IgY>}^5w`vTB(G`PTZaDiGBo5o(tp)qli|NeV( z@H_=R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/edi_product_oca/static/description/index.html b/edi_product_oca/static/description/index.html new file mode 100644 index 000000000..3af87ab69 --- /dev/null +++ b/edi_product_oca/static/description/index.html @@ -0,0 +1,421 @@ + + + + + + +EDI Product + + + +

+

EDI Product

+ + +

Beta License: AGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

+

Provide basic configuration for products with EDI framework.

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • ForgeFlow
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/edi-framework project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/edi_product_oca/views/product_views.xml b/edi_product_oca/views/product_views.xml new file mode 100644 index 000000000..5aa3f6b47 --- /dev/null +++ b/edi_product_oca/views/product_views.xml @@ -0,0 +1,35 @@ + + + + product.template.form.view - edi_product_oca + product.template + + + + + + + + + + + +
+ +
+ +
+
+
From 24c3d263136472eea2ea1bdd492d72496bee3b44 Mon Sep 17 00:00:00 2001 From: duongtq Date: Fri, 29 Dec 2023 16:52:22 +0700 Subject: [PATCH 017/145] [IMP] edi_product_oca: Plug EDI framework to product.packaging --- edi_product_oca/README.rst | 5 +-- edi_product_oca/__manifest__.py | 9 +++-- edi_product_oca/i18n/edi_product_oca.pot | 29 ++++++++++++++++ edi_product_oca/models/__init__.py | 1 + edi_product_oca/models/product_packaging.py | 9 +++++ edi_product_oca/readme/CONTRIBUTORS.rst | 1 + edi_product_oca/readme/DESCRIPTION.rst | 2 +- edi_product_oca/static/description/index.html | 6 ++-- .../views/product_packaging_views.xml | 34 +++++++++++++++++++ 9 files changed, 87 insertions(+), 9 deletions(-) create mode 100644 edi_product_oca/models/product_packaging.py create mode 100644 edi_product_oca/views/product_packaging_views.xml diff --git a/edi_product_oca/README.rst b/edi_product_oca/README.rst index 610a8a487..ace960a32 100644 --- a/edi_product_oca/README.rst +++ b/edi_product_oca/README.rst @@ -7,7 +7,7 @@ EDI Product !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:9eb0e9359e040d5f63d6af40d6aeaaa5f9f04450c7fa6cc4a65b8000ba2c1057 + !! source digest: sha256:182f81f8a3229e1fb48427be42405ac2358227e5e21e0639405ddfbedae20ffb !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -28,7 +28,7 @@ EDI Product |badge1| |badge2| |badge3| |badge4| |badge5| -Provide basic configuration for products with EDI framework. +Provide basic configuration for products and product packaging with EDI framework. **Table of contents** @@ -57,6 +57,7 @@ Contributors ~~~~~~~~~~~~ * Oriol Miranda +* Duong (Tran Quoc) Maintainers ~~~~~~~~~~~ diff --git a/edi_product_oca/__manifest__.py b/edi_product_oca/__manifest__.py index 53b8b46a5..0b332d84b 100644 --- a/edi_product_oca/__manifest__.py +++ b/edi_product_oca/__manifest__.py @@ -4,8 +4,8 @@ { "name": "EDI Product", "summary": """ - EDI framework configuration and base logic for products""", - "version": "16.0.1.0.0", + EDI framework configuration and base logic for products and products packaging""", + "version": "16.0.1.1.0", "license": "AGPL-3", "author": "ForgeFlow, Odoo Community Association (OCA)", "website": "https://github.com/OCA/edi-framework", @@ -13,5 +13,8 @@ "product", "edi_oca", ], - "data": ["views/product_views.xml"], + "data": [ + "views/product_views.xml", + "views/product_packaging_views.xml", + ], } diff --git a/edi_product_oca/i18n/edi_product_oca.pot b/edi_product_oca/i18n/edi_product_oca.pot index ad2ba93ee..6eed29623 100644 --- a/edi_product_oca/i18n/edi_product_oca.pot +++ b/edi_product_oca/i18n/edi_product_oca.pot @@ -14,53 +14,69 @@ msgstr "" "Plural-Forms: \n" #. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__edi_disable_auto #: model:ir.model.fields,field_description:edi_product_oca.field_product_product__edi_disable_auto #: model:ir.model.fields,field_description:edi_product_oca.field_product_template__edi_disable_auto msgid "Disable auto" msgstr "" #. module: edi_product_oca +#: model_terms:ir.ui.view,arch_db:edi_product_oca.product_packaging_form_view #: model_terms:ir.ui.view,arch_db:edi_product_oca.product_template_form_view msgid "EDI" msgstr "" #. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__origin_edi_endpoint_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__origin_edi_endpoint_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__origin_edi_endpoint_id +msgid "EDI origin endpoint" +msgstr "" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__origin_exchange_type_id #: model:ir.model.fields,field_description:edi_product_oca.field_product_product__origin_exchange_type_id #: model:ir.model.fields,field_description:edi_product_oca.field_product_template__origin_exchange_type_id msgid "EDI origin exchange type" msgstr "" #. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__origin_exchange_record_id #: model:ir.model.fields,field_description:edi_product_oca.field_product_product__origin_exchange_record_id #: model:ir.model.fields,field_description:edi_product_oca.field_product_template__origin_exchange_record_id msgid "EDI origin record" msgstr "" #. module: edi_product_oca +#: model:ir.model.fields,help:edi_product_oca.field_product_packaging__origin_exchange_record_id #: model:ir.model.fields,help:edi_product_oca.field_product_product__origin_exchange_record_id #: model:ir.model.fields,help:edi_product_oca.field_product_template__origin_exchange_record_id msgid "EDI record that originated this document." msgstr "" #. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__edi_config #: model:ir.model.fields,field_description:edi_product_oca.field_product_product__edi_config #: model:ir.model.fields,field_description:edi_product_oca.field_product_template__edi_config msgid "Edi Config" msgstr "" #. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__edi_has_form_config #: model:ir.model.fields,field_description:edi_product_oca.field_product_product__edi_has_form_config #: model:ir.model.fields,field_description:edi_product_oca.field_product_template__edi_has_form_config msgid "Edi Has Form Config" msgstr "" #. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__exchange_record_ids #: model:ir.model.fields,field_description:edi_product_oca.field_product_product__exchange_record_ids #: model:ir.model.fields,field_description:edi_product_oca.field_product_template__exchange_record_ids msgid "Exchange Record" msgstr "" #. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__exchange_record_count #: model:ir.model.fields,field_description:edi_product_oca.field_product_product__exchange_record_count #: model:ir.model.fields,field_description:edi_product_oca.field_product_template__exchange_record_count msgid "Exchange Record Count" @@ -71,12 +87,25 @@ msgstr "" msgid "Product" msgstr "" +#. module: edi_product_oca +#: model:ir.model,name:edi_product_oca.model_product_packaging +msgid "Product Packaging" +msgstr "" + #. module: edi_product_oca #: model:ir.model,name:edi_product_oca.model_product_product msgid "Product Variant" msgstr "" #. module: edi_product_oca +#: model:ir.model.fields,help:edi_product_oca.field_product_packaging__origin_edi_endpoint_id +#: model:ir.model.fields,help:edi_product_oca.field_product_product__origin_edi_endpoint_id +#: model:ir.model.fields,help:edi_product_oca.field_product_template__origin_edi_endpoint_id +msgid "Record generated via this endpoint" +msgstr "" + +#. module: edi_product_oca +#: model:ir.model.fields,help:edi_product_oca.field_product_packaging__edi_disable_auto #: model:ir.model.fields,help:edi_product_oca.field_product_product__edi_disable_auto #: model:ir.model.fields,help:edi_product_oca.field_product_template__edi_disable_auto msgid "When marked, EDI automatic processing will be avoided" diff --git a/edi_product_oca/models/__init__.py b/edi_product_oca/models/__init__.py index 18b37e853..e9bc8fca4 100644 --- a/edi_product_oca/models/__init__.py +++ b/edi_product_oca/models/__init__.py @@ -1,2 +1,3 @@ from . import product_product from . import product_template +from . import product_packaging diff --git a/edi_product_oca/models/product_packaging.py b/edi_product_oca/models/product_packaging.py new file mode 100644 index 000000000..8dbccec84 --- /dev/null +++ b/edi_product_oca/models/product_packaging.py @@ -0,0 +1,9 @@ +# Copyright 2024 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class ProductPackaging(models.Model): + _name = "product.packaging" + _inherit = ["product.packaging", "edi.exchange.consumer.mixin"] diff --git a/edi_product_oca/readme/CONTRIBUTORS.rst b/edi_product_oca/readme/CONTRIBUTORS.rst index f63a57cf5..55f3afbf2 100644 --- a/edi_product_oca/readme/CONTRIBUTORS.rst +++ b/edi_product_oca/readme/CONTRIBUTORS.rst @@ -1 +1,2 @@ * Oriol Miranda +* Duong (Tran Quoc) diff --git a/edi_product_oca/readme/DESCRIPTION.rst b/edi_product_oca/readme/DESCRIPTION.rst index 42019c0ed..5403d861b 100644 --- a/edi_product_oca/readme/DESCRIPTION.rst +++ b/edi_product_oca/readme/DESCRIPTION.rst @@ -1 +1 @@ -Provide basic configuration for products with EDI framework. +Provide basic configuration for products and product packaging with EDI framework. diff --git a/edi_product_oca/static/description/index.html b/edi_product_oca/static/description/index.html index 3af87ab69..848736ffe 100644 --- a/edi_product_oca/static/description/index.html +++ b/edi_product_oca/static/description/index.html @@ -1,4 +1,3 @@ - @@ -367,10 +366,10 @@

EDI Product

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:9eb0e9359e040d5f63d6af40d6aeaaa5f9f04450c7fa6cc4a65b8000ba2c1057 +!! source digest: sha256:182f81f8a3229e1fb48427be42405ac2358227e5e21e0639405ddfbedae20ffb !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

-

Provide basic configuration for products with EDI framework.

+

Provide basic configuration for products and product packaging with EDI framework.

Table of contents

diff --git a/edi_product_oca/views/product_packaging_views.xml b/edi_product_oca/views/product_packaging_views.xml new file mode 100644 index 000000000..25dee50ea --- /dev/null +++ b/edi_product_oca/views/product_packaging_views.xml @@ -0,0 +1,34 @@ + + + + product.packaging.form.view - edi_product_oca + product.packaging + + + + + + + + + + +
+ +
+
+
+
+
From 615030f54c6e07c098c74e1cd03088f93083ce57 Mon Sep 17 00:00:00 2001 From: Telmo Santos Date: Wed, 3 Apr 2024 13:27:32 +0200 Subject: [PATCH 018/145] [FIX] edi_product_oca: fix product template form --- edi_product_oca/README.rst | 2 +- edi_product_oca/__manifest__.py | 2 +- edi_product_oca/static/description/index.html | 2 +- edi_product_oca/views/product_views.xml | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/edi_product_oca/README.rst b/edi_product_oca/README.rst index ace960a32..ad33853ec 100644 --- a/edi_product_oca/README.rst +++ b/edi_product_oca/README.rst @@ -7,7 +7,7 @@ EDI Product !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:182f81f8a3229e1fb48427be42405ac2358227e5e21e0639405ddfbedae20ffb + !! source digest: sha256:8f49d35294d2a460c2a760795e6ae4db9f0b69301fe18c483bf7bc0c1177d5b1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/edi_product_oca/__manifest__.py b/edi_product_oca/__manifest__.py index 0b332d84b..6ab9419fc 100644 --- a/edi_product_oca/__manifest__.py +++ b/edi_product_oca/__manifest__.py @@ -5,7 +5,7 @@ "name": "EDI Product", "summary": """ EDI framework configuration and base logic for products and products packaging""", - "version": "16.0.1.1.0", + "version": "16.0.1.1.1", "license": "AGPL-3", "author": "ForgeFlow, Odoo Community Association (OCA)", "website": "https://github.com/OCA/edi-framework", diff --git a/edi_product_oca/static/description/index.html b/edi_product_oca/static/description/index.html index 848736ffe..c55ea712b 100644 --- a/edi_product_oca/static/description/index.html +++ b/edi_product_oca/static/description/index.html @@ -366,7 +366,7 @@

EDI Product

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:182f81f8a3229e1fb48427be42405ac2358227e5e21e0639405ddfbedae20ffb +!! source digest: sha256:8f49d35294d2a460c2a760795e6ae4db9f0b69301fe18c483bf7bc0c1177d5b1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

Provide basic configuration for products and product packaging with EDI framework.

diff --git a/edi_product_oca/views/product_views.xml b/edi_product_oca/views/product_views.xml index 5aa3f6b47..001cd31a1 100644 --- a/edi_product_oca/views/product_views.xml +++ b/edi_product_oca/views/product_views.xml @@ -5,6 +5,10 @@ product.template + + + + From 2e73d4f401aac6b6e1c1686c052534f03218c076 Mon Sep 17 00:00:00 2001 From: mymage Date: Wed, 15 May 2024 06:48:10 +0000 Subject: [PATCH 019/145] Added translation using Weblate (Italian) --- edi_product_oca/i18n/it.po | 115 +++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 edi_product_oca/i18n/it.po diff --git a/edi_product_oca/i18n/it.po b/edi_product_oca/i18n/it.po new file mode 100644 index 000000000..5d5416862 --- /dev/null +++ b/edi_product_oca/i18n/it.po @@ -0,0 +1,115 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * edi_product_oca +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-07-29 08:58+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.6.2\n" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__edi_disable_auto +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__edi_disable_auto +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__edi_disable_auto +msgid "Disable auto" +msgstr "Disabilita automatico" + +#. module: edi_product_oca +#: model_terms:ir.ui.view,arch_db:edi_product_oca.product_packaging_form_view +#: model_terms:ir.ui.view,arch_db:edi_product_oca.product_template_form_view +msgid "EDI" +msgstr "EDI" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__origin_edi_endpoint_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__origin_edi_endpoint_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__origin_edi_endpoint_id +msgid "EDI origin endpoint" +msgstr "Endpoint origine EDI" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__origin_exchange_type_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__origin_exchange_type_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__origin_exchange_type_id +msgid "EDI origin exchange type" +msgstr "Tipo scambio origine EDI" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__origin_exchange_record_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__origin_exchange_record_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__origin_exchange_record_id +msgid "EDI origin record" +msgstr "Record origine EDI" + +#. module: edi_product_oca +#: model:ir.model.fields,help:edi_product_oca.field_product_packaging__origin_exchange_record_id +#: model:ir.model.fields,help:edi_product_oca.field_product_product__origin_exchange_record_id +#: model:ir.model.fields,help:edi_product_oca.field_product_template__origin_exchange_record_id +msgid "EDI record that originated this document." +msgstr "Record EDI che ha generato questo documento." + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__edi_config +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__edi_config +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__edi_config +msgid "Edi Config" +msgstr "Configurazione EDI" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__edi_has_form_config +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__edi_has_form_config +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__edi_has_form_config +msgid "Edi Has Form Config" +msgstr "EDI ha una maschera di configurazione" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__exchange_record_ids +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__exchange_record_ids +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__exchange_record_ids +msgid "Exchange Record" +msgstr "Record di scambio" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__exchange_record_count +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__exchange_record_count +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__exchange_record_count +msgid "Exchange Record Count" +msgstr "Conteggio record di scambio" + +#. module: edi_product_oca +#: model:ir.model,name:edi_product_oca.model_product_template +msgid "Product" +msgstr "Prodotto" + +#. module: edi_product_oca +#: model:ir.model,name:edi_product_oca.model_product_packaging +msgid "Product Packaging" +msgstr "Imballaggio prodotto" + +#. module: edi_product_oca +#: model:ir.model,name:edi_product_oca.model_product_product +msgid "Product Variant" +msgstr "Variante prodotto" + +#. module: edi_product_oca +#: model:ir.model.fields,help:edi_product_oca.field_product_packaging__origin_edi_endpoint_id +#: model:ir.model.fields,help:edi_product_oca.field_product_product__origin_edi_endpoint_id +#: model:ir.model.fields,help:edi_product_oca.field_product_template__origin_edi_endpoint_id +msgid "Record generated via this endpoint" +msgstr "Record generato attraverso questo endpoint" + +#. module: edi_product_oca +#: model:ir.model.fields,help:edi_product_oca.field_product_packaging__edi_disable_auto +#: model:ir.model.fields,help:edi_product_oca.field_product_product__edi_disable_auto +#: model:ir.model.fields,help:edi_product_oca.field_product_template__edi_disable_auto +msgid "When marked, EDI automatic processing will be avoided" +msgstr "Quando selezionata, l'elaborazione EDI automatica verrà evitata" From 1498bc24c3dab8437cb55ac6142d303fe42c7de1 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Fri, 6 Jun 2025 07:12:40 +0000 Subject: [PATCH 020/145] [UPD] Update edi_product_oca.pot --- edi_product_oca/i18n/edi_product_oca.pot | 14 +++++++------- edi_product_oca/i18n/it.po | 17 ++++++++++------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/edi_product_oca/i18n/edi_product_oca.pot b/edi_product_oca/i18n/edi_product_oca.pot index 6eed29623..d9357cef8 100644 --- a/edi_product_oca/i18n/edi_product_oca.pot +++ b/edi_product_oca/i18n/edi_product_oca.pot @@ -82,6 +82,13 @@ msgstr "" msgid "Exchange Record Count" msgstr "" +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__exchange_related_record_ids +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__exchange_related_record_ids +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__exchange_related_record_ids +msgid "Exchange Related Record" +msgstr "" + #. module: edi_product_oca #: model:ir.model,name:edi_product_oca.model_product_template msgid "Product" @@ -97,13 +104,6 @@ msgstr "" msgid "Product Variant" msgstr "" -#. module: edi_product_oca -#: model:ir.model.fields,help:edi_product_oca.field_product_packaging__origin_edi_endpoint_id -#: model:ir.model.fields,help:edi_product_oca.field_product_product__origin_edi_endpoint_id -#: model:ir.model.fields,help:edi_product_oca.field_product_template__origin_edi_endpoint_id -msgid "Record generated via this endpoint" -msgstr "" - #. module: edi_product_oca #: model:ir.model.fields,help:edi_product_oca.field_product_packaging__edi_disable_auto #: model:ir.model.fields,help:edi_product_oca.field_product_product__edi_disable_auto diff --git a/edi_product_oca/i18n/it.po b/edi_product_oca/i18n/it.po index 5d5416862..7519b9fc9 100644 --- a/edi_product_oca/i18n/it.po +++ b/edi_product_oca/i18n/it.po @@ -85,6 +85,13 @@ msgstr "Record di scambio" msgid "Exchange Record Count" msgstr "Conteggio record di scambio" +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__exchange_related_record_ids +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__exchange_related_record_ids +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__exchange_related_record_ids +msgid "Exchange Related Record" +msgstr "" + #. module: edi_product_oca #: model:ir.model,name:edi_product_oca.model_product_template msgid "Product" @@ -100,16 +107,12 @@ msgstr "Imballaggio prodotto" msgid "Product Variant" msgstr "Variante prodotto" -#. module: edi_product_oca -#: model:ir.model.fields,help:edi_product_oca.field_product_packaging__origin_edi_endpoint_id -#: model:ir.model.fields,help:edi_product_oca.field_product_product__origin_edi_endpoint_id -#: model:ir.model.fields,help:edi_product_oca.field_product_template__origin_edi_endpoint_id -msgid "Record generated via this endpoint" -msgstr "Record generato attraverso questo endpoint" - #. module: edi_product_oca #: model:ir.model.fields,help:edi_product_oca.field_product_packaging__edi_disable_auto #: model:ir.model.fields,help:edi_product_oca.field_product_product__edi_disable_auto #: model:ir.model.fields,help:edi_product_oca.field_product_template__edi_disable_auto msgid "When marked, EDI automatic processing will be avoided" msgstr "Quando selezionata, l'elaborazione EDI automatica verrà evitata" + +#~ msgid "Record generated via this endpoint" +#~ msgstr "Record generato attraverso questo endpoint" From a08c1b0a2247ddc482b1b6741b5e6b760b8354a7 Mon Sep 17 00:00:00 2001 From: mymage Date: Mon, 4 Aug 2025 11:27:11 +0000 Subject: [PATCH 021/145] Translated using Weblate (Italian) Currently translated at 100.0% (15 of 15 strings) Translation: edi-framework-16.0/edi-framework-16.0-edi_product_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-16-0/edi-framework-16-0-edi_product_oca/it/ --- edi_product_oca/i18n/it.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/edi_product_oca/i18n/it.po b/edi_product_oca/i18n/it.po index 7519b9fc9..8ef58843a 100644 --- a/edi_product_oca/i18n/it.po +++ b/edi_product_oca/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2024-07-29 08:58+0000\n" +"PO-Revision-Date: 2025-08-04 14:25+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.6.2\n" +"X-Generator: Weblate 5.10.4\n" #. module: edi_product_oca #: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__edi_disable_auto @@ -90,7 +90,7 @@ msgstr "Conteggio record di scambio" #: model:ir.model.fields,field_description:edi_product_oca.field_product_product__exchange_related_record_ids #: model:ir.model.fields,field_description:edi_product_oca.field_product_template__exchange_related_record_ids msgid "Exchange Related Record" -msgstr "" +msgstr "Record relativo allo scambio" #. module: edi_product_oca #: model:ir.model,name:edi_product_oca.model_product_template From d5461b78ab5e12b3fa4b5701dbccb460693aee99 Mon Sep 17 00:00:00 2001 From: davidbeckercbl Date: Fri, 26 Sep 2025 11:29:39 +0000 Subject: [PATCH 022/145] Added translation using Weblate (German) --- edi_product_oca/i18n/de.po | 115 +++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 edi_product_oca/i18n/de.po diff --git a/edi_product_oca/i18n/de.po b/edi_product_oca/i18n/de.po new file mode 100644 index 000000000..35746c207 --- /dev/null +++ b/edi_product_oca/i18n/de.po @@ -0,0 +1,115 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * edi_product_oca +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2025-09-26 15:44+0000\n" +"Last-Translator: davidbeckercbl \n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.10.4\n" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__edi_disable_auto +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__edi_disable_auto +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__edi_disable_auto +msgid "Disable auto" +msgstr "Automatik deaktivieren" + +#. module: edi_product_oca +#: model_terms:ir.ui.view,arch_db:edi_product_oca.product_packaging_form_view +#: model_terms:ir.ui.view,arch_db:edi_product_oca.product_template_form_view +msgid "EDI" +msgstr "EDI" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__origin_edi_endpoint_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__origin_edi_endpoint_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__origin_edi_endpoint_id +msgid "EDI origin endpoint" +msgstr "EDI-Ursprungs-Endpunkt" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__origin_exchange_type_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__origin_exchange_type_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__origin_exchange_type_id +msgid "EDI origin exchange type" +msgstr "EDI-Ursprungs-Austauschtyp" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__origin_exchange_record_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__origin_exchange_record_id +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__origin_exchange_record_id +msgid "EDI origin record" +msgstr "EDI-Ursprungsdatensatz" + +#. module: edi_product_oca +#: model:ir.model.fields,help:edi_product_oca.field_product_packaging__origin_exchange_record_id +#: model:ir.model.fields,help:edi_product_oca.field_product_product__origin_exchange_record_id +#: model:ir.model.fields,help:edi_product_oca.field_product_template__origin_exchange_record_id +msgid "EDI record that originated this document." +msgstr "EDI Datensatz, aus dem dieses Dokument erstellt wurde." + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__edi_config +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__edi_config +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__edi_config +msgid "Edi Config" +msgstr "EDI Konfiguration" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__edi_has_form_config +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__edi_has_form_config +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__edi_has_form_config +msgid "Edi Has Form Config" +msgstr "EDI hat Formular-Konfiguration" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__exchange_record_ids +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__exchange_record_ids +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__exchange_record_ids +msgid "Exchange Record" +msgstr "Austauschdatensatz" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__exchange_record_count +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__exchange_record_count +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__exchange_record_count +msgid "Exchange Record Count" +msgstr "Anzahl Austauschdatensätze" + +#. module: edi_product_oca +#: model:ir.model.fields,field_description:edi_product_oca.field_product_packaging__exchange_related_record_ids +#: model:ir.model.fields,field_description:edi_product_oca.field_product_product__exchange_related_record_ids +#: model:ir.model.fields,field_description:edi_product_oca.field_product_template__exchange_related_record_ids +msgid "Exchange Related Record" +msgstr "Zugehöriger Austauschdatensatz" + +#. module: edi_product_oca +#: model:ir.model,name:edi_product_oca.model_product_template +msgid "Product" +msgstr "Produkt" + +#. module: edi_product_oca +#: model:ir.model,name:edi_product_oca.model_product_packaging +msgid "Product Packaging" +msgstr "Produktverpackung" + +#. module: edi_product_oca +#: model:ir.model,name:edi_product_oca.model_product_product +msgid "Product Variant" +msgstr "Produktvariante" + +#. module: edi_product_oca +#: model:ir.model.fields,help:edi_product_oca.field_product_packaging__edi_disable_auto +#: model:ir.model.fields,help:edi_product_oca.field_product_product__edi_disable_auto +#: model:ir.model.fields,help:edi_product_oca.field_product_template__edi_disable_auto +msgid "When marked, EDI automatic processing will be avoided" +msgstr "Wenn markiert, wird die automatische EDI-Verarbeitung vermieden" From 2e336977df6a731e8b8b5292b9499caf35babc3f Mon Sep 17 00:00:00 2001 From: Ricardoalso Date: Thu, 26 Feb 2026 14:16:33 +0100 Subject: [PATCH 023/145] [IMP] edi_product_oca: pre-commit execution --- edi_product_oca/README.rst | 23 ++++++++++--------- edi_product_oca/pyproject.toml | 3 +++ edi_product_oca/readme/CONTRIBUTORS.md | 2 ++ edi_product_oca/readme/CONTRIBUTORS.rst | 2 -- .../{DESCRIPTION.rst => DESCRIPTION.md} | 3 ++- edi_product_oca/static/description/index.html | 20 +++++++++------- .../views/product_packaging_views.xml | 12 +++++----- edi_product_oca/views/product_views.xml | 5 ++-- 8 files changed, 39 insertions(+), 31 deletions(-) create mode 100644 edi_product_oca/pyproject.toml create mode 100644 edi_product_oca/readme/CONTRIBUTORS.md delete mode 100644 edi_product_oca/readme/CONTRIBUTORS.rst rename edi_product_oca/readme/{DESCRIPTION.rst => DESCRIPTION.md} (77%) diff --git a/edi_product_oca/README.rst b/edi_product_oca/README.rst index ad33853ec..5950ca415 100644 --- a/edi_product_oca/README.rst +++ b/edi_product_oca/README.rst @@ -17,18 +17,19 @@ EDI Product :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi--framework-lightgray.png?logo=github - :target: https://github.com/OCA/edi-framework/tree/16.0/edi_product_oca + :target: https://github.com/OCA/edi-framework/tree/18.0/edi_product_oca :alt: OCA/edi-framework .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/edi-framework-16-0/edi-framework-16-0-edi_product_oca + :target: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_product_oca :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -Provide basic configuration for products and product packaging with EDI framework. +Provide basic configuration for products and product packaging with EDI +framework. **Table of contents** @@ -41,7 +42,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -49,18 +50,18 @@ Credits ======= Authors -~~~~~~~ +------- * ForgeFlow Contributors -~~~~~~~~~~~~ +------------ -* Oriol Miranda -* Duong (Tran Quoc) +- Oriol Miranda +- Duong (Tran Quoc) Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -72,6 +73,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/edi-framework `_ project on GitHub. +This module is part of the `OCA/edi-framework `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/edi_product_oca/pyproject.toml b/edi_product_oca/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/edi_product_oca/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/edi_product_oca/readme/CONTRIBUTORS.md b/edi_product_oca/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..76cf72b67 --- /dev/null +++ b/edi_product_oca/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- Oriol Miranda \ +- Duong (Tran Quoc) \ diff --git a/edi_product_oca/readme/CONTRIBUTORS.rst b/edi_product_oca/readme/CONTRIBUTORS.rst deleted file mode 100644 index 55f3afbf2..000000000 --- a/edi_product_oca/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,2 +0,0 @@ -* Oriol Miranda -* Duong (Tran Quoc) diff --git a/edi_product_oca/readme/DESCRIPTION.rst b/edi_product_oca/readme/DESCRIPTION.md similarity index 77% rename from edi_product_oca/readme/DESCRIPTION.rst rename to edi_product_oca/readme/DESCRIPTION.md index 5403d861b..06918307c 100644 --- a/edi_product_oca/readme/DESCRIPTION.rst +++ b/edi_product_oca/readme/DESCRIPTION.md @@ -1 +1,2 @@ -Provide basic configuration for products and product packaging with EDI framework. +Provide basic configuration for products and product packaging with EDI +framework. diff --git a/edi_product_oca/static/description/index.html b/edi_product_oca/static/description/index.html index c55ea712b..6e95ec654 100644 --- a/edi_product_oca/static/description/index.html +++ b/edi_product_oca/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -368,8 +369,9 @@

EDI Product

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:8f49d35294d2a460c2a760795e6ae4db9f0b69301fe18c483bf7bc0c1177d5b1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

-

Provide basic configuration for products and product packaging with EDI framework.

+

Beta License: AGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

+

Provide basic configuration for products and product packaging with EDI +framework.

Table of contents

    @@ -387,7 +389,7 @@

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

@@ -408,11 +410,13 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/edi-framework project on GitHub.

+

This module is part of the OCA/edi-framework project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/edi_product_oca/views/product_packaging_views.xml b/edi_product_oca/views/product_packaging_views.xml index 25dee50ea..3f26ddf42 100644 --- a/edi_product_oca/views/product_packaging_views.xml +++ b/edi_product_oca/views/product_packaging_views.xml @@ -6,11 +6,11 @@ - - - - + + + +
@@ -29,6 +29,6 @@
-
- +
+ diff --git a/edi_product_oca/views/product_views.xml b/edi_product_oca/views/product_views.xml index 001cd31a1..a047b99a7 100644 --- a/edi_product_oca/views/product_views.xml +++ b/edi_product_oca/views/product_views.xml @@ -33,7 +33,6 @@ />
- -
- +
+ From e50fa64139559eb6a55e8239fd511eba657d6076 Mon Sep 17 00:00:00 2001 From: Ricardoalso Date: Thu, 26 Feb 2026 14:16:33 +0100 Subject: [PATCH 024/145] [MIG] edi_product_oca: Migration to 18.0 --- edi_product_oca/__manifest__.py | 7 ++++--- edi_product_oca/views/product_packaging_views.xml | 2 +- edi_product_oca/views/product_views.xml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/edi_product_oca/__manifest__.py b/edi_product_oca/__manifest__.py index 6ab9419fc..50fbc6291 100644 --- a/edi_product_oca/__manifest__.py +++ b/edi_product_oca/__manifest__.py @@ -4,14 +4,15 @@ { "name": "EDI Product", "summary": """ - EDI framework configuration and base logic for products and products packaging""", - "version": "16.0.1.1.1", + EDI framework configuration and base logic + for products and products packaging""", + "version": "18.0.1.0.0", "license": "AGPL-3", "author": "ForgeFlow, Odoo Community Association (OCA)", "website": "https://github.com/OCA/edi-framework", "depends": [ "product", - "edi_oca", + "edi_endpoint_oca", ], "data": [ "views/product_views.xml", diff --git a/edi_product_oca/views/product_packaging_views.xml b/edi_product_oca/views/product_packaging_views.xml index 3f26ddf42..c6f4c4bc5 100644 --- a/edi_product_oca/views/product_packaging_views.xml +++ b/edi_product_oca/views/product_packaging_views.xml @@ -18,7 +18,7 @@ type="object" class="oe_stat_button" icon="fa-retweet" - attrs="{'invisible': [('exchange_record_count', '=', 0)]}" + invisible="exchange_record_count == 0" name="action_view_edi_records" > Date: Fri, 6 Mar 2026 14:08:35 +0000 Subject: [PATCH 025/145] [BOT] post-merge updates --- README.md | 2 +- edi_core_oca/README.rst | 2 +- edi_core_oca/__manifest__.py | 2 +- edi_core_oca/static/description/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4215364a4..582b145a7 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ addon | version | maintainers | summary [edi_account_core_oca](edi_account_core_oca/) | 18.0.1.1.1 | etobella | Define EDI Configuration for Account Moves [edi_account_oca](edi_account_oca/) | 18.0.1.1.1 | etobella | Define some component listeners for Account Moves [edi_component_oca](edi_component_oca/) | 18.0.1.0.3 | simahawk etobella | Allow to use Connector as a source in EDI -[edi_core_oca](edi_core_oca/) | 18.0.1.6.1 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. +[edi_core_oca](edi_core_oca/) | 18.0.1.6.2 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. [edi_endpoint_oca](edi_endpoint_oca/) | 18.0.1.0.3 | | Base module allowing configuration of custom endpoints for EDI framework. [edi_exchange_template_oca](edi_exchange_template_oca/) | 18.0.1.3.3 | simahawk | Allows definition of exchanges via templates. [edi_exchange_template_party_data](edi_exchange_template_party_data/) | 18.0.1.0.1 | simahawk | Glue module between edi_exchange_template and edi_party_data diff --git a/edi_core_oca/README.rst b/edi_core_oca/README.rst index c9d20457e..3a825331c 100644 --- a/edi_core_oca/README.rst +++ b/edi_core_oca/README.rst @@ -11,7 +11,7 @@ EDI !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:95302609a43b47d26df26c7943e10d1f31b7d4ca39df3de4bb8d7a5e345890fc + !! source digest: sha256:dc74a21567e5367c2732791c6f09154378de1d36f2e182554cbc42776da1b386 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/edi_core_oca/__manifest__.py b/edi_core_oca/__manifest__.py index 9598d843d..e6978a9c0 100644 --- a/edi_core_oca/__manifest__.py +++ b/edi_core_oca/__manifest__.py @@ -9,7 +9,7 @@ Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. """, - "version": "18.0.1.6.1", + "version": "18.0.1.6.2", "website": "https://github.com/OCA/edi-framework", "development_status": "Beta", "license": "LGPL-3", diff --git a/edi_core_oca/static/description/index.html b/edi_core_oca/static/description/index.html index fdf943e75..d37fc6fe8 100644 --- a/edi_core_oca/static/description/index.html +++ b/edi_core_oca/static/description/index.html @@ -372,7 +372,7 @@

EDI

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:95302609a43b47d26df26c7943e10d1f31b7d4ca39df3de4bb8d7a5e345890fc +!! source digest: sha256:dc74a21567e5367c2732791c6f09154378de1d36f2e182554cbc42776da1b386 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

Base EDI backend.

From fe331cf54a5694a82d3cdf0b5d5f4a2518cf0414 Mon Sep 17 00:00:00 2001 From: Hadrien Huvelle Date: Thu, 12 Mar 2026 10:02:37 +0100 Subject: [PATCH 026/145] [FIX] edi_core_oca: fix UnboundLocalError --- edi_core_oca/models/edi_backend.py | 1 + 1 file changed, 1 insertion(+) diff --git a/edi_core_oca/models/edi_backend.py b/edi_core_oca/models/edi_backend.py index 47d9c3db7..a8c6ce8bd 100644 --- a/edi_core_oca/models/edi_backend.py +++ b/edi_core_oca/models/edi_backend.py @@ -436,6 +436,7 @@ def exchange_process(self, exchange_record): old_state = state = exchange_record.edi_exchange_state error = traceback = False message = None + res = None try: res = self._exchange_process(exchange_record) except self._swallable_exceptions() as err: From c400231d93ee42f8f8fb0b8f06eff6ede5c60e30 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 12 Mar 2026 10:39:47 +0000 Subject: [PATCH 027/145] [BOT] post-merge updates --- README.md | 2 +- edi_core_oca/README.rst | 2 +- edi_core_oca/__manifest__.py | 2 +- edi_core_oca/static/description/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 582b145a7..c47671a72 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ addon | version | maintainers | summary [edi_account_core_oca](edi_account_core_oca/) | 18.0.1.1.1 | etobella | Define EDI Configuration for Account Moves [edi_account_oca](edi_account_oca/) | 18.0.1.1.1 | etobella | Define some component listeners for Account Moves [edi_component_oca](edi_component_oca/) | 18.0.1.0.3 | simahawk etobella | Allow to use Connector as a source in EDI -[edi_core_oca](edi_core_oca/) | 18.0.1.6.2 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. +[edi_core_oca](edi_core_oca/) | 18.0.1.6.3 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. [edi_endpoint_oca](edi_endpoint_oca/) | 18.0.1.0.3 | | Base module allowing configuration of custom endpoints for EDI framework. [edi_exchange_template_oca](edi_exchange_template_oca/) | 18.0.1.3.3 | simahawk | Allows definition of exchanges via templates. [edi_exchange_template_party_data](edi_exchange_template_party_data/) | 18.0.1.0.1 | simahawk | Glue module between edi_exchange_template and edi_party_data diff --git a/edi_core_oca/README.rst b/edi_core_oca/README.rst index 3a825331c..e2e7a0291 100644 --- a/edi_core_oca/README.rst +++ b/edi_core_oca/README.rst @@ -11,7 +11,7 @@ EDI !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:dc74a21567e5367c2732791c6f09154378de1d36f2e182554cbc42776da1b386 + !! source digest: sha256:b6fae2fa03965f4601739b334b3c948154db0f7b82d9b8cc4ae5e945d278c013 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/edi_core_oca/__manifest__.py b/edi_core_oca/__manifest__.py index e6978a9c0..2d91d84a0 100644 --- a/edi_core_oca/__manifest__.py +++ b/edi_core_oca/__manifest__.py @@ -9,7 +9,7 @@ Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. """, - "version": "18.0.1.6.2", + "version": "18.0.1.6.3", "website": "https://github.com/OCA/edi-framework", "development_status": "Beta", "license": "LGPL-3", diff --git a/edi_core_oca/static/description/index.html b/edi_core_oca/static/description/index.html index d37fc6fe8..9948c300b 100644 --- a/edi_core_oca/static/description/index.html +++ b/edi_core_oca/static/description/index.html @@ -372,7 +372,7 @@

EDI

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:dc74a21567e5367c2732791c6f09154378de1d36f2e182554cbc42776da1b386 +!! source digest: sha256:b6fae2fa03965f4601739b334b3c948154db0f7b82d9b8cc4ae5e945d278c013 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

Base EDI backend.

From 4e98519006d2b890d152ec3852e5a4afed662252 Mon Sep 17 00:00:00 2001 From: SilvioC2C Date: Thu, 26 Mar 2026 16:21:27 +0100 Subject: [PATCH 028/145] [FIX] edi_core_oca: fix record rule Exchange Record's ``res_id`` is a ``Many2onReference`` field, which internally converts False-ish values to 0 before storing them to the cache and the DB. The rule's domain old leaf ``('res_id', '=', False)`` was instead converted to a SQL query clause ``WHERE "edi_exchange_record.res_id" IS NULL``. Since all ``edi_exchange_record`` rows contain a non-negative integer in the ``res_id`` column, the rule old domain leaf always failed to fetch any record. Changing the leaf to ``('res_id', '=', 0)`` fixes the issue, making such Exchange Records visible again for internal users. --- edi_core_oca/__manifest__.py | 2 +- .../migrations/18.0.1.6.4/post-mig.py | 24 ++++++++++++++ edi_core_oca/security/ir_model_access.xml | 2 +- edi_core_oca/tests/test_security.py | 32 +++++++++++++++++++ 4 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 edi_core_oca/migrations/18.0.1.6.4/post-mig.py diff --git a/edi_core_oca/__manifest__.py b/edi_core_oca/__manifest__.py index 2d91d84a0..6274a6c3c 100644 --- a/edi_core_oca/__manifest__.py +++ b/edi_core_oca/__manifest__.py @@ -9,7 +9,7 @@ Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. """, - "version": "18.0.1.6.3", + "version": "18.0.1.6.4", "website": "https://github.com/OCA/edi-framework", "development_status": "Beta", "license": "LGPL-3", diff --git a/edi_core_oca/migrations/18.0.1.6.4/post-mig.py b/edi_core_oca/migrations/18.0.1.6.4/post-mig.py new file mode 100644 index 000000000..6b52c0399 --- /dev/null +++ b/edi_core_oca/migrations/18.0.1.6.4/post-mig.py @@ -0,0 +1,24 @@ +# Copyright 2026 Camptocamp SA (http://www.camptocamp.com) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from logging import getLogger + +from openupgradelib import openupgrade + +_logger = getLogger(__name__) + + +@openupgrade.migrate() +def migrate(env, version): + xmlid = "edi_core_oca.rule_edi_exchange_record_user" + if rule := env.ref(xmlid, False): + old_domain = (rule.domain_force or "").strip() + new_domain = ["|", ("model", "!=", False), ("res_id", "=", 0)] + _logger.info( + f"Updating {rule} ({xmlid=}) domain:\n" + f" - old: {old_domain}\n" + f" - new: {new_domain}" + ) + rule.domain_force = new_domain + else: + _logger.warning(f"No rule found with XMLID '{xmlid}', skipping...") diff --git a/edi_core_oca/security/ir_model_access.xml b/edi_core_oca/security/ir_model_access.xml index 8c85f038b..31c9c73ae 100644 --- a/edi_core_oca/security/ir_model_access.xml +++ b/edi_core_oca/security/ir_model_access.xml @@ -122,7 +122,7 @@ ['|', ('model','!=', False), ('res_id', '=', False)] + >['|', ('model', '!=', False), ('res_id', '=', 0)] diff --git a/edi_core_oca/tests/test_security.py b/edi_core_oca/tests/test_security.py index c0f7b1b9b..c26c62e4e 100644 --- a/edi_core_oca/tests/test_security.py +++ b/edi_core_oca/tests/test_security.py @@ -303,3 +303,35 @@ def test_search_pagination_with_inaccessible_middle_records(self): # The records fetched from the second page must be present in the final result self.assertIn(visible_id_2, records.ids) + + def test_search_no_res_id(self): + """Test Exc Rec visibility for internal users when ``res_id`` is False-ish + + Exchange Record's ``res_id`` is a ``Many2onReference`` field, which internally + converts False-ish values to 0 before storing them to the cache and the DB. + The rule's domain old leaf ``('res_id', '=', False)`` was instead converted to a + SQL query clause ``WHERE "edi_exchange_record.res_id" IS NULL``. + Since all ``edi_exchange_record`` rows contain a non-negative integer in the + ``res_id`` column, the rule old domain leaf always failed to fetch any record. + + Changing the leaf to ``('res_id', '=', 0)`` fixes the issue, making such + Exchange Records visible again for internal users. + """ + # Add the test user to the internal users group + self.user.write({"groups_id": [(4, self.env.ref("base.group_user").id)]}) + + # Create Exchange Records with no model (condition ``('model', '!=', False)`` + # will fail) and False-ish record ID (to test condition ``('res_id', '=', 0)``): + # such False-ish values are all converted to 0 by ``fields.Many2oneReference`` + # methods (and methods of its superclasses) when updating the cache values and + # preparing SQL queries to flush to the DB + exc_recs = self.env["edi.exchange.record"] + type_code = "test_csv_output" + vals = {"model": False} + for res_id in (0, 0.00, False, None, "", self.env["base"]): + exc_recs += self.backend.create_record(type_code, vals | {"res_id": res_id}) + self.assertEqual(exc_recs.mapped("res_id"), [0] * len(exc_recs)) + + # Check that the test user can actually fetch such records + exc_recs_model = self.env["edi.exchange.record"].with_user(self.user) + self.assertEqual(exc_recs_model.search([("id", "in", exc_recs.ids)]), exc_recs) From 42a520270f7c9fbc1c6f2dd650cf3505cfd8a78e Mon Sep 17 00:00:00 2001 From: Vincent Van Rossem Date: Wed, 1 Apr 2026 12:10:35 +0200 Subject: [PATCH 029/145] [FIX] edi_record_metadata_oca: rename get_metadata (ORM conflict) `get_metadata()` is a built-in Odoo ORM method called by the "Debug > View Metadata" action. Defining it on `edi.exchange.record` overrode that behavior, causing a JS crash when opening the debug dialog: "Cannot read properties of undefined (reading 'id')" Renamed to `edi_get_metadata()` / `edi_set_metadata()` (for consistency) and updated all callers. --- .../models/edi_exchange_consumer_mixin.py | 6 +++--- edi_record_metadata_oca/models/edi_exchange_record.py | 4 ++-- edi_record_metadata_oca/tests/test_metadata.py | 6 +++--- edi_sale_input_oca/tests/test_process.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/edi_record_metadata_oca/models/edi_exchange_consumer_mixin.py b/edi_record_metadata_oca/models/edi_exchange_consumer_mixin.py index ba9080a6e..87b6af99c 100644 --- a/edi_record_metadata_oca/models/edi_exchange_consumer_mixin.py +++ b/edi_record_metadata_oca/models/edi_exchange_consumer_mixin.py @@ -36,11 +36,11 @@ def _edi_get_metadata_to_store(self, orig_vals): def _edi_store_metadata(self, metadata): if self.origin_exchange_record_id: - self.origin_exchange_record_id.set_metadata(metadata) + self.origin_exchange_record_id.edi_set_metadata(metadata) @api.model def _edi_store_metadata_before_create(self, origin_id, metadata): - self.env["edi.exchange.record"].browse(origin_id).set_metadata(metadata) + self.env["edi.exchange.record"].browse(origin_id).edi_set_metadata(metadata) def _edi_get_metadata(self): - return self.origin_exchange_record_id.get_metadata() + return self.origin_exchange_record_id.edi_get_metadata() diff --git a/edi_record_metadata_oca/models/edi_exchange_record.py b/edi_record_metadata_oca/models/edi_exchange_record.py index 960fafef7..cd9be86cb 100644 --- a/edi_record_metadata_oca/models/edi_exchange_record.py +++ b/edi_record_metadata_oca/models/edi_exchange_record.py @@ -25,8 +25,8 @@ def _compute_metadata_display(self): for rec in self: rec.metadata_display = json.dumps(rec.metadata, sort_keys=True, indent=4) - def set_metadata(self, data): + def edi_set_metadata(self, data): self.metadata = data - def get_metadata(self): + def edi_get_metadata(self): return self.metadata diff --git a/edi_record_metadata_oca/tests/test_metadata.py b/edi_record_metadata_oca/tests/test_metadata.py index a29916863..28daf71a6 100644 --- a/edi_record_metadata_oca/tests/test_metadata.py +++ b/edi_record_metadata_oca/tests/test_metadata.py @@ -31,7 +31,7 @@ def tearDown(self): super().tearDown() def test_fields(self): - self.exc_record.set_metadata({"foo": "baz", "bar": "waa"}) + self.exc_record.edi_set_metadata({"foo": "baz", "bar": "waa"}) self.assertTrue(self.exc_record.metadata) self.assertTrue(self.exc_record.metadata_display) @@ -44,7 +44,7 @@ def test_no_store(self): } ) self.assertFalse(consumer_record._edi_get_metadata()) - self.assertFalse(self.exc_record.get_metadata()) + self.assertFalse(self.exc_record.edi_get_metadata()) def test_store(self): vals = { @@ -66,4 +66,4 @@ def test_store(self): "additional": True, } self.assertEqual(consumer_record._edi_get_metadata(), expected) - self.assertEqual(self.exc_record.get_metadata(), expected) + self.assertEqual(self.exc_record.edi_get_metadata(), expected) diff --git a/edi_sale_input_oca/tests/test_process.py b/edi_sale_input_oca/tests/test_process.py index 2fdea5f5b..bb5ab5c23 100644 --- a/edi_sale_input_oca/tests/test_process.py +++ b/edi_sale_input_oca/tests/test_process.py @@ -130,7 +130,7 @@ def test_metadata(self): order=dict(origin_exchange_record_id=self.record.id) ), ).create_order(parsed_order, "pricelist") - metadata = self.record.get_metadata() + metadata = self.record.edi_get_metadata() # Lines are mapped via `edi_id` (coming from `order_line_ref` by default) line_metadata = metadata["orig_values"]["lines"]["1111"] for k in ( From ed73890cb1cb9968bc9614222f080f3764c982f3 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 2 Apr 2026 08:35:11 +0000 Subject: [PATCH 030/145] [BOT] post-merge updates --- README.md | 4 ++-- edi_record_metadata_oca/__manifest__.py | 2 +- edi_sale_input_oca/README.rst | 2 +- edi_sale_input_oca/__manifest__.py | 2 +- edi_sale_input_oca/static/description/index.html | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c47671a72..769b64da9 100644 --- a/README.md +++ b/README.md @@ -31,9 +31,9 @@ addon | version | maintainers | summary [edi_oca](edi_oca/) | 18.0.1.5.2 | simahawk etobella | Integrate all EDI modules together [edi_party_data_oca](edi_party_data_oca/) | 18.0.1.0.1 | simahawk | Allow to configure and retrieve party information for EDI exchanges. [edi_queue_oca](edi_queue_oca/) | 18.0.1.0.2 | | Set Queue Jobs on EDI -[edi_record_metadata_oca](edi_record_metadata_oca/) | 18.0.1.0.3 | simahawk | Allow to store metadata for related records. +[edi_record_metadata_oca](edi_record_metadata_oca/) | 18.0.1.0.4 | simahawk | Allow to store metadata for related records. [edi_sale_endpoint](edi_sale_endpoint/) | 18.0.1.0.0 | simahawk | Glue module between edi_sale_oca and edi_endpoint_oca. -[edi_sale_input_oca](edi_sale_input_oca/) | 18.0.1.0.1 | simahawk | Process incoming sale orders with the EDI framework. +[edi_sale_input_oca](edi_sale_input_oca/) | 18.0.1.0.2 | simahawk | Process incoming sale orders with the EDI framework. [edi_sale_oca](edi_sale_oca/) | 18.0.1.0.1 | simahawk | Configuration and special behaviors for EDI on sales. [edi_sale_stock_oca](edi_sale_stock_oca/) | 18.0.1.0.0 | ivantodorovich | Configuration and special behaviors for EDI on sales & stock. [edi_sale_ubl_oca](edi_sale_ubl_oca/) | 18.0.1.0.2 | | Configuration and special behaviors for EDI UBL exchanges related to sales. diff --git a/edi_record_metadata_oca/__manifest__.py b/edi_record_metadata_oca/__manifest__.py index 68e7b8631..050f49fac 100644 --- a/edi_record_metadata_oca/__manifest__.py +++ b/edi_record_metadata_oca/__manifest__.py @@ -7,7 +7,7 @@ "summary": """ Allow to store metadata for related records. """, - "version": "18.0.1.0.3", + "version": "18.0.1.0.4", "development_status": "Alpha", "license": "LGPL-3", "website": "https://github.com/OCA/edi-framework", diff --git a/edi_sale_input_oca/README.rst b/edi_sale_input_oca/README.rst index 1b89a27a9..99ac47dd6 100644 --- a/edi_sale_input_oca/README.rst +++ b/edi_sale_input_oca/README.rst @@ -11,7 +11,7 @@ EDI Sales input !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:1458f5d439bfde955a3c1dc00e8c8ab99b674d8bdb518b9bfe6e475df80742a6 + !! source digest: sha256:031a6af4aecc4f3f856b85d4d793f21481e7f45e181875c59435bf59e17b3239 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png diff --git a/edi_sale_input_oca/__manifest__.py b/edi_sale_input_oca/__manifest__.py index b182ce1fc..a523ea605 100644 --- a/edi_sale_input_oca/__manifest__.py +++ b/edi_sale_input_oca/__manifest__.py @@ -6,7 +6,7 @@ "summary": """ Process incoming sale orders with the EDI framework. """, - "version": "18.0.1.0.1", + "version": "18.0.1.0.2", "development_status": "Alpha", "license": "AGPL-3", "author": "Camptocamp,Odoo Community Association (OCA)", diff --git a/edi_sale_input_oca/static/description/index.html b/edi_sale_input_oca/static/description/index.html index 1ce64058d..2187525cd 100644 --- a/edi_sale_input_oca/static/description/index.html +++ b/edi_sale_input_oca/static/description/index.html @@ -372,7 +372,7 @@

EDI Sales input

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:1458f5d439bfde955a3c1dc00e8c8ab99b674d8bdb518b9bfe6e475df80742a6 +!! source digest: sha256:031a6af4aecc4f3f856b85d4d793f21481e7f45e181875c59435bf59e17b3239 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Alpha License: AGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

From 22712bd73e33393ae04edfc21ff83024a68fb36c Mon Sep 17 00:00:00 2001 From: oca-ci Date: Tue, 14 Apr 2026 04:55:40 +0000 Subject: [PATCH 031/145] [UPD] Update edi_sale_ubl_output_oca.pot --- .../i18n/edi_sale_ubl_output_oca.pot | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/edi_sale_ubl_output_oca/i18n/edi_sale_ubl_output_oca.pot b/edi_sale_ubl_output_oca/i18n/edi_sale_ubl_output_oca.pot index 197b4f2d4..28651d779 100644 --- a/edi_sale_ubl_output_oca/i18n/edi_sale_ubl_output_oca.pot +++ b/edi_sale_ubl_output_oca/i18n/edi_sale_ubl_output_oca.pot @@ -13,46 +13,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qwb_tmpl_ubl_order_response_out -msgid "1.0" -msgstr "" - -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qwb_tmpl_ubl_order_response_out -msgid "12:30:00" -msgstr "" - -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qwb_tmpl_ubl_order_response_out -msgid "2.2" -msgstr "" - -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qwb_tmpl_ubl_order_response_out -msgid "2010-01-21" -msgstr "" - -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qwb_tmpl_ubl_order_response_out -msgid "2010-02-10" -msgstr "" - -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qwb_tmpl_ubl_order_response_out -msgid "2010-02-25" -msgstr "" - -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qweb_tmpl_ubl_party -msgid "7300070011115" -msgstr "" - -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qweb_tmpl_ubl_party -msgid "7302347231111" -msgstr "" - #. module: edi_sale_ubl_output_oca #: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qwb_tmpl_ubl_order_response_out msgid "EUR" From 558897ff6fc6dfe1ffcc3ff565da229f2977f4c4 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 14 Apr 2026 05:01:58 +0000 Subject: [PATCH 032/145] [BOT] post-merge updates --- README.md | 2 +- edi_core_oca/README.rst | 2 +- edi_core_oca/__manifest__.py | 2 +- edi_core_oca/static/description/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 769b64da9..7764503f7 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ addon | version | maintainers | summary [edi_account_core_oca](edi_account_core_oca/) | 18.0.1.1.1 | etobella | Define EDI Configuration for Account Moves [edi_account_oca](edi_account_oca/) | 18.0.1.1.1 | etobella | Define some component listeners for Account Moves [edi_component_oca](edi_component_oca/) | 18.0.1.0.3 | simahawk etobella | Allow to use Connector as a source in EDI -[edi_core_oca](edi_core_oca/) | 18.0.1.6.3 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. +[edi_core_oca](edi_core_oca/) | 18.0.1.6.4 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. [edi_endpoint_oca](edi_endpoint_oca/) | 18.0.1.0.3 | | Base module allowing configuration of custom endpoints for EDI framework. [edi_exchange_template_oca](edi_exchange_template_oca/) | 18.0.1.3.3 | simahawk | Allows definition of exchanges via templates. [edi_exchange_template_party_data](edi_exchange_template_party_data/) | 18.0.1.0.1 | simahawk | Glue module between edi_exchange_template and edi_party_data diff --git a/edi_core_oca/README.rst b/edi_core_oca/README.rst index e2e7a0291..509f600b6 100644 --- a/edi_core_oca/README.rst +++ b/edi_core_oca/README.rst @@ -11,7 +11,7 @@ EDI !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:b6fae2fa03965f4601739b334b3c948154db0f7b82d9b8cc4ae5e945d278c013 + !! source digest: sha256:f88985c95bf0be6a23386723430462ce467c85c53c5ca6dc0d76766191d7ab86 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/edi_core_oca/__manifest__.py b/edi_core_oca/__manifest__.py index 2d91d84a0..6274a6c3c 100644 --- a/edi_core_oca/__manifest__.py +++ b/edi_core_oca/__manifest__.py @@ -9,7 +9,7 @@ Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. """, - "version": "18.0.1.6.3", + "version": "18.0.1.6.4", "website": "https://github.com/OCA/edi-framework", "development_status": "Beta", "license": "LGPL-3", diff --git a/edi_core_oca/static/description/index.html b/edi_core_oca/static/description/index.html index 9948c300b..ba02a122c 100644 --- a/edi_core_oca/static/description/index.html +++ b/edi_core_oca/static/description/index.html @@ -372,7 +372,7 @@

EDI

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:b6fae2fa03965f4601739b334b3c948154db0f7b82d9b8cc4ae5e945d278c013 +!! source digest: sha256:f88985c95bf0be6a23386723430462ce467c85c53c5ca6dc0d76766191d7ab86 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

Base EDI backend.

From 8b9cdeb1a7c5ef8447c77d542a2716fbc573ed66 Mon Sep 17 00:00:00 2001 From: Weblate Date: Tue, 14 Apr 2026 05:02:07 +0000 Subject: [PATCH 033/145] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: edi-framework-18.0/edi-framework-18.0-edi_sale_ubl_output_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_sale_ubl_output_oca/ --- edi_sale_ubl_output_oca/i18n/it.po | 64 +++++++++++------------------- 1 file changed, 24 insertions(+), 40 deletions(-) diff --git a/edi_sale_ubl_output_oca/i18n/it.po b/edi_sale_ubl_output_oca/i18n/it.po index 09016fe82..6342ce979 100644 --- a/edi_sale_ubl_output_oca/i18n/it.po +++ b/edi_sale_ubl_output_oca/i18n/it.po @@ -16,46 +16,6 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 5.10.4\n" -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qwb_tmpl_ubl_order_response_out -msgid "1.0" -msgstr "1.0" - -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qwb_tmpl_ubl_order_response_out -msgid "12:30:00" -msgstr "12:30:00" - -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qwb_tmpl_ubl_order_response_out -msgid "2.2" -msgstr "2.2" - -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qwb_tmpl_ubl_order_response_out -msgid "2010-01-21" -msgstr "2010-01-21" - -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qwb_tmpl_ubl_order_response_out -msgid "2010-02-10" -msgstr "2010-02-10" - -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qwb_tmpl_ubl_order_response_out -msgid "2010-02-25" -msgstr "2010-02-25" - -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qweb_tmpl_ubl_party -msgid "7300070011115" -msgstr "7300070011115" - -#. module: edi_sale_ubl_output_oca -#: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qweb_tmpl_ubl_party -msgid "7302347231111" -msgstr "7302347231111" - #. module: edi_sale_ubl_output_oca #: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qwb_tmpl_ubl_order_response_out msgid "EUR" @@ -85,3 +45,27 @@ msgstr "urn:www.cenbii.eu:profile:BIIXYZ:ver1.0" #: model_terms:ir.ui.view,arch_db:edi_sale_ubl_output_oca.qwb_tmpl_ubl_order_response_out msgid "urn:www.cenbii.eu:transaction:biicoretrdmXYZ:ver1.0" msgstr "urn:www.cenbii.eu:transaction:biicoretrdmXYZ:ver1.0" + +#~ msgid "1.0" +#~ msgstr "1.0" + +#~ msgid "12:30:00" +#~ msgstr "12:30:00" + +#~ msgid "2.2" +#~ msgstr "2.2" + +#~ msgid "2010-01-21" +#~ msgstr "2010-01-21" + +#~ msgid "2010-02-10" +#~ msgstr "2010-02-10" + +#~ msgid "2010-02-25" +#~ msgstr "2010-02-25" + +#~ msgid "7300070011115" +#~ msgstr "7300070011115" + +#~ msgid "7302347231111" +#~ msgstr "7302347231111" From 8365818d798fb025fb4365a3e7a9af334cc8a103 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 16 Apr 2026 14:32:29 +0000 Subject: [PATCH 034/145] [BOT] post-merge updates --- README.md | 2 +- edi_core_oca/README.rst | 2 +- edi_core_oca/__manifest__.py | 2 +- edi_core_oca/static/description/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7764503f7..5b92fb3a4 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ addon | version | maintainers | summary [edi_account_core_oca](edi_account_core_oca/) | 18.0.1.1.1 | etobella | Define EDI Configuration for Account Moves [edi_account_oca](edi_account_oca/) | 18.0.1.1.1 | etobella | Define some component listeners for Account Moves [edi_component_oca](edi_component_oca/) | 18.0.1.0.3 | simahawk etobella | Allow to use Connector as a source in EDI -[edi_core_oca](edi_core_oca/) | 18.0.1.6.4 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. +[edi_core_oca](edi_core_oca/) | 18.0.1.6.5 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. [edi_endpoint_oca](edi_endpoint_oca/) | 18.0.1.0.3 | | Base module allowing configuration of custom endpoints for EDI framework. [edi_exchange_template_oca](edi_exchange_template_oca/) | 18.0.1.3.3 | simahawk | Allows definition of exchanges via templates. [edi_exchange_template_party_data](edi_exchange_template_party_data/) | 18.0.1.0.1 | simahawk | Glue module between edi_exchange_template and edi_party_data diff --git a/edi_core_oca/README.rst b/edi_core_oca/README.rst index 509f600b6..f6f7f6077 100644 --- a/edi_core_oca/README.rst +++ b/edi_core_oca/README.rst @@ -11,7 +11,7 @@ EDI !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:f88985c95bf0be6a23386723430462ce467c85c53c5ca6dc0d76766191d7ab86 + !! source digest: sha256:97e3e3a909c79dced8fe9e6165a0c440f95f672e4a184a9b014cde518a5848c2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/edi_core_oca/__manifest__.py b/edi_core_oca/__manifest__.py index 6274a6c3c..2f2f6a9f6 100644 --- a/edi_core_oca/__manifest__.py +++ b/edi_core_oca/__manifest__.py @@ -9,7 +9,7 @@ Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. """, - "version": "18.0.1.6.4", + "version": "18.0.1.6.5", "website": "https://github.com/OCA/edi-framework", "development_status": "Beta", "license": "LGPL-3", diff --git a/edi_core_oca/static/description/index.html b/edi_core_oca/static/description/index.html index ba02a122c..e7a67132d 100644 --- a/edi_core_oca/static/description/index.html +++ b/edi_core_oca/static/description/index.html @@ -372,7 +372,7 @@

EDI

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:f88985c95bf0be6a23386723430462ce467c85c53c5ca6dc0d76766191d7ab86 +!! source digest: sha256:97e3e3a909c79dced8fe9e6165a0c440f95f672e4a184a9b014cde518a5848c2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

Base EDI backend.

From 743d6a6b10dcb9980153b971e1b24fbf32f864a1 Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Mon, 20 Apr 2026 16:32:47 +0200 Subject: [PATCH 035/145] Sync from odoo repo template --- .copier-answers.yml | 3 +- .gitattributes | 1 + .github/workflows/pre-commit.yml | 2 + .github/workflows/test.yml | 9 ++++- .pre-commit-config.yaml | 10 ++++- .pylintrc | 69 ++++++++++++++++---------------- .pylintrc-mandatory | 50 +++++++++++------------ README.md | 5 ++- checklog-odoo.cfg | 2 + eslint.config.cjs | 5 ++- 10 files changed, 89 insertions(+), 67 deletions(-) create mode 100644 .gitattributes diff --git a/.copier-answers.yml b/.copier-answers.yml index a20b1cc13..19ac99534 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,8 +1,7 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v1.29 +_commit: v1.40 _src_path: git+https://github.com/OCA/oca-addons-repo-template additional_ruff_rules: [] -ci: GitHub convert_readme_fragments_to_markdown: true enable_checklog_odoo: true generate_requirements_txt: true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..e0d56685a --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +test-requirements.txt merge=union diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 5eb021ef1..1291da527 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -17,6 +17,8 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.11" + cache: 'pip' + cache-dependency-path: '.pre-commit-config.yaml' - name: Get python version run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV - uses: actions/cache@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a06488079..97ed5dfd4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,7 @@ jobs: makepot: "true" services: postgres: - image: postgres:12.0 + image: postgres:12 env: POSTGRES_USER: odoo POSTGRES_PASSWORD: odoo @@ -65,6 +65,13 @@ jobs: run: oca_init_test_database - name: Run tests run: oca_run_tests + - name: Upload screenshots from JS tests + uses: actions/upload-artifact@v4 + if: ${{ failure() }} + with: + name: Screenshots of failed JS tests - ${{ matrix.name }}${{ join(matrix.include) }} + path: /tmp/odoo_tests/${{ env.PGDATABASE }} + if-no-files-found: ignore - uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0d69703b5..32504883c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,12 +38,17 @@ repos: entry: found a en.po file language: fail files: '[a-zA-Z0-9_]*/i18n/en\.po$' + - id: obsolete dotfiles + name: obsolete dotfiles + entry: found obsolete files; remove them + files: '^(\.travis\.yml|\.t2d\.yml|CONTRIBUTING\.md|\.prettierrc\.yml|\.eslintrc\.yml)$' + language: fail - repo: https://github.com/sbidoul/whool - rev: v1.2 + rev: v1.3 hooks: - id: whool-init - repo: https://github.com/oca/maintainer-tools - rev: bf9ecb9938b6a5deca0ff3d870fbd3f33341fded + rev: b89f767503be6ab2b11e4f50a7557cb20066e667 hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons @@ -95,6 +100,7 @@ repos: additional_dependencies: - "eslint@9.12.0" - "eslint-plugin-jsdoc@50.3.1" + - "globals@16.0.0" - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: diff --git a/.pylintrc b/.pylintrc index 7c62b6d2e..197cb6737 100644 --- a/.pylintrc +++ b/.pylintrc @@ -25,19 +25,25 @@ disable=all enable=anomalous-backslash-in-string, api-one-deprecated, api-one-multi-together, - assignment-from-none, - attribute-deprecated, class-camelcase, - dangerous-default-value, dangerous-view-replace-wo-priority, - development-status-allowed, duplicate-id-csv, - duplicate-key, duplicate-xml-fields, duplicate-xml-record-id, eval-referenced, - eval-used, incoherent-interpreter-exec-perm, + openerp-exception-warning, + redundant-modulename-xml, + relative-import, + rst-syntax-error, + wrong-tabs-instead-of-spaces, + xml-syntax-error, + assignment-from-none, + attribute-deprecated, + dangerous-default-value, + development-status-allowed, + duplicate-key, + eval-used, license-allowed, manifest-author-string, manifest-deprecated-key, @@ -48,73 +54,68 @@ enable=anomalous-backslash-in-string, method-inverse, method-required-super, method-search, - openerp-exception-warning, pointless-statement, pointless-string-statement, print-used, redundant-keyword-arg, - redundant-modulename-xml, reimported, - relative-import, return-in-init, - rst-syntax-error, sql-injection, too-few-format-args, translation-field, translation-required, unreachable, use-vim-comment, - wrong-tabs-instead-of-spaces, - xml-syntax-error, - attribute-string-redundant, character-not-valid-in-resource-link, - consider-merging-classes-inherited, - context-overridden, create-user-wo-reset-password, dangerous-filter-wo-user, dangerous-qweb-replace-wo-priority, deprecated-data-xml-node, deprecated-openerp-xml-node, duplicate-po-message-definition, - except-pass, file-not-used, + missing-newline-extrafiles, + old-api7-method-defined, + po-msgstr-variables, + po-syntax-error, + str-format-used, + unnecessary-utf8-coding-comment, + xml-attribute-translatable, + xml-deprecated-qweb-directive, + xml-deprecated-tree-attribute, + attribute-string-redundant, + consider-merging-classes-inherited, + context-overridden, + except-pass, invalid-commit, manifest-maintainers-list, - missing-newline-extrafiles, missing-readme, missing-return, odoo-addons-relative-import, - old-api7-method-defined, - po-msgstr-variables, - po-syntax-error, renamed-field-parameter, resource-not-exist, - str-format-used, test-folder-imported, translation-contains-variable, translation-positional-used, - unnecessary-utf8-coding-comment, website-manifest-key-not-valid-uri, - xml-attribute-translatable, - xml-deprecated-qweb-directive, - xml-deprecated-tree-attribute, external-request-timeout, - # messages that do not cause the lint step to fail - consider-merging-classes-inherited, + missing-manifest-dependency, + too-complex,, create-user-wo-reset-password, dangerous-filter-wo-user, - deprecated-module, file-not-used, - invalid-commit, - missing-manifest-dependency, missing-newline-extrafiles, - missing-readme, no-utf8-coding-comment, - odoo-addons-relative-import, old-api7-method-defined, + unnecessary-utf8-coding-comment, + # messages that do not cause the lint step to fail + consider-merging-classes-inherited, + deprecated-module, + invalid-commit, + missing-readme, + odoo-addons-relative-import, redefined-builtin, - too-complex, - unnecessary-utf8-coding-comment + manifest-external-assets [REPORTS] diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory index 018fd61cd..73674c04d 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -17,19 +17,25 @@ disable=all enable=anomalous-backslash-in-string, api-one-deprecated, api-one-multi-together, - assignment-from-none, - attribute-deprecated, class-camelcase, - dangerous-default-value, dangerous-view-replace-wo-priority, - development-status-allowed, duplicate-id-csv, - duplicate-key, duplicate-xml-fields, duplicate-xml-record-id, eval-referenced, - eval-used, incoherent-interpreter-exec-perm, + openerp-exception-warning, + redundant-modulename-xml, + relative-import, + rst-syntax-error, + wrong-tabs-instead-of-spaces, + xml-syntax-error, + assignment-from-none, + attribute-deprecated, + dangerous-default-value, + development-status-allowed, + duplicate-key, + eval-used, license-allowed, manifest-author-string, manifest-deprecated-key, @@ -40,56 +46,50 @@ enable=anomalous-backslash-in-string, method-inverse, method-required-super, method-search, - openerp-exception-warning, pointless-statement, pointless-string-statement, print-used, redundant-keyword-arg, - redundant-modulename-xml, reimported, - relative-import, return-in-init, - rst-syntax-error, sql-injection, too-few-format-args, translation-field, translation-required, unreachable, use-vim-comment, - wrong-tabs-instead-of-spaces, - xml-syntax-error, - attribute-string-redundant, character-not-valid-in-resource-link, - consider-merging-classes-inherited, - context-overridden, create-user-wo-reset-password, dangerous-filter-wo-user, dangerous-qweb-replace-wo-priority, deprecated-data-xml-node, deprecated-openerp-xml-node, duplicate-po-message-definition, - except-pass, file-not-used, + missing-newline-extrafiles, + old-api7-method-defined, + po-msgstr-variables, + po-syntax-error, + str-format-used, + unnecessary-utf8-coding-comment, + xml-attribute-translatable, + xml-deprecated-qweb-directive, + xml-deprecated-tree-attribute, + attribute-string-redundant, + consider-merging-classes-inherited, + context-overridden, + except-pass, invalid-commit, manifest-maintainers-list, - missing-newline-extrafiles, missing-readme, missing-return, odoo-addons-relative-import, - old-api7-method-defined, - po-msgstr-variables, - po-syntax-error, renamed-field-parameter, resource-not-exist, - str-format-used, test-folder-imported, translation-contains-variable, translation-positional-used, - unnecessary-utf8-coding-comment, website-manifest-key-not-valid-uri, - xml-attribute-translatable, - xml-deprecated-qweb-directive, - xml-deprecated-tree-attribute, external-request-timeout [REPORTS] diff --git a/README.md b/README.md index 5b92fb3a4..35889a0be 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ +[![Support the OCA](https://odoo-community.org/readme-banner-image)](https://odoo-community.org/get-involved?utm_source=repo-readme) + +# edi-framework [![Runboat](https://img.shields.io/badge/runboat-Try%20me-875A7B.png)](https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&target_branch=18.0) [![Pre-commit Status](https://github.com/OCA/edi-framework/actions/workflows/pre-commit.yml/badge.svg?branch=18.0)](https://github.com/OCA/edi-framework/actions/workflows/pre-commit.yml?query=branch%3A18.0) [![Build Status](https://github.com/OCA/edi-framework/actions/workflows/test.yml/badge.svg?branch=18.0)](https://github.com/OCA/edi-framework/actions/workflows/test.yml?query=branch%3A18.0) @@ -7,8 +10,6 @@ -# edi-framework - edi-framework diff --git a/checklog-odoo.cfg b/checklog-odoo.cfg index 0b55b7bf6..58d43aa66 100644 --- a/checklog-odoo.cfg +++ b/checklog-odoo.cfg @@ -1,3 +1,5 @@ [checklog-odoo] ignore= WARNING.* 0 failed, 0 error\(s\).* + WARNING .* Killing chrome descendants-or-self .* + WARNING.* Missing widget: res_partner_many2one for field of type many2one.* diff --git a/eslint.config.cjs b/eslint.config.cjs index 0d5731f89..dd0cbe0ae 100644 --- a/eslint.config.cjs +++ b/eslint.config.cjs @@ -1,3 +1,4 @@ +var globals = require('globals'); jsdoc = require("eslint-plugin-jsdoc"); const config = [{ @@ -16,6 +17,8 @@ const config = [{ openerp: "readonly", owl: "readonly", luxon: "readonly", + QUnit: "readonly", + ...globals.browser, }, ecmaVersion: 2024, @@ -191,7 +194,7 @@ const config = [{ }, }, { - files: ["**/*.esm.js"], + files: ["**/*.esm.js", "**/*test.js"], languageOptions: { ecmaVersion: 2024, From d69012fd60dc300c2fa1ebaa7ca40e8c12c219d9 Mon Sep 17 00:00:00 2001 From: duongtq Date: Mon, 25 Mar 2024 12:19:40 +0700 Subject: [PATCH 036/145] [ADD] edi_notification_oca --- edi_notification_oca/README.rst | 87 ++++ edi_notification_oca/__init__.py | 2 + edi_notification_oca/__manifest__.py | 17 + edi_notification_oca/components/__init__.py | 1 + edi_notification_oca/components/listener.py | 46 ++ .../data/mail_activity_data.xml | 12 + edi_notification_oca/models/__init__.py | 2 + .../models/edi_exchange_record.py | 11 + .../models/edi_exchange_type.py | 52 +++ edi_notification_oca/readme/CONTRIBUTORS.rst | 2 + edi_notification_oca/readme/CREDITS.rst | 1 + edi_notification_oca/readme/DESCRIPTION.rst | 1 + .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 435 ++++++++++++++++++ edi_notification_oca/tests/__init__.py | 1 + .../tests/test_edi_notification.py | 176 +++++++ .../views/edi_exchange_type_views.xml | 36 ++ 17 files changed, 882 insertions(+) create mode 100644 edi_notification_oca/README.rst create mode 100644 edi_notification_oca/__init__.py create mode 100644 edi_notification_oca/__manifest__.py create mode 100644 edi_notification_oca/components/__init__.py create mode 100644 edi_notification_oca/components/listener.py create mode 100644 edi_notification_oca/data/mail_activity_data.xml create mode 100644 edi_notification_oca/models/__init__.py create mode 100644 edi_notification_oca/models/edi_exchange_record.py create mode 100644 edi_notification_oca/models/edi_exchange_type.py create mode 100644 edi_notification_oca/readme/CONTRIBUTORS.rst create mode 100644 edi_notification_oca/readme/CREDITS.rst create mode 100644 edi_notification_oca/readme/DESCRIPTION.rst create mode 100644 edi_notification_oca/static/description/icon.png create mode 100644 edi_notification_oca/static/description/index.html create mode 100644 edi_notification_oca/tests/__init__.py create mode 100644 edi_notification_oca/tests/test_edi_notification.py create mode 100644 edi_notification_oca/views/edi_exchange_type_views.xml diff --git a/edi_notification_oca/README.rst b/edi_notification_oca/README.rst new file mode 100644 index 000000000..61d2bf64f --- /dev/null +++ b/edi_notification_oca/README.rst @@ -0,0 +1,87 @@ +================ +EDI Notification +================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:430afb16d5a7fa86b62589b77b3caa51698cd52619a5a384aff592cb0892a3d0 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png + :target: https://odoo-community.org/page/development-status + :alt: Alpha +.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi--framework-lightgray.png?logo=github + :target: https://github.com/OCA/edi-framework/tree/16.0/edi_notification_oca + :alt: OCA/edi-framework +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/edi-framework-16-0/edi-framework-16-0-edi_notification_oca + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module provides sending notification feature when exchange record. + +.. IMPORTANT:: + This is an alpha version, the data model and design can change at any time without warning. + Only for development or testing purpose, do not use in production. + `More details on development status `_ + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Camptocamp + +Contributors +~~~~~~~~~~~~ + +* Duong (Tran Quoc) +* Simone Orsi + +Other credits +~~~~~~~~~~~~~ + +The creation of this module was financially supported by Camptocamp. + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/edi-framework `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/edi_notification_oca/__init__.py b/edi_notification_oca/__init__.py new file mode 100644 index 000000000..f24d3e242 --- /dev/null +++ b/edi_notification_oca/__init__.py @@ -0,0 +1,2 @@ +from . import components +from . import models diff --git a/edi_notification_oca/__manifest__.py b/edi_notification_oca/__manifest__.py new file mode 100644 index 000000000..f3696bc1d --- /dev/null +++ b/edi_notification_oca/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2024 Camptocamp SA +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +{ + "name": "EDI Notification", + "summary": """Define notification activities on exchange records.""", + "version": "16.0.1.0.0", + "development_status": "Alpha", + "license": "LGPL-3", + "website": "https://github.com/OCA/edi-framework", + "author": "Camptocamp,Odoo Community Association (OCA)", + "depends": [ + "edi_oca", + ], + "data": ["data/mail_activity_data.xml", "views/edi_exchange_type_views.xml"], + "installable": True, +} diff --git a/edi_notification_oca/components/__init__.py b/edi_notification_oca/components/__init__.py new file mode 100644 index 000000000..9430369c2 --- /dev/null +++ b/edi_notification_oca/components/__init__.py @@ -0,0 +1 @@ +from . import listener diff --git a/edi_notification_oca/components/listener.py b/edi_notification_oca/components/listener.py new file mode 100644 index 000000000..4dcb9b138 --- /dev/null +++ b/edi_notification_oca/components/listener.py @@ -0,0 +1,46 @@ +# Copyright 2024 Camptocamp SA +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from odoo import _ + +from odoo.addons.component.core import Component + + +class EdiNotificationListener(Component): + _name = "edi.notification.component.listener" + _inherit = "base.event.listener" + + def on_edi_exchange_error(self, record): + exc_type = record.type_id + notify_on_process_error = exc_type.notify_on_process_error + activity_type = exc_type.notify_on_process_error_activity_type_id + if ( + not notify_on_process_error + or not activity_type + or not ( + exc_type.notify_on_process_error_groups_ids + or exc_type.notify_on_process_error_users_ids + ) + ): + return True + users = self._get_users_to_notify(exc_type) + # Send notification to defined users + for user in users: + record.activity_schedule( + activity_type_id=activity_type.id, + summary=_( + "EDI: Process error on record '%(identifier)s'.", + identifier=record.identifier, + ), + note=record.exchange_error, + user_id=user.id, + automated=True, + ) + return True + + def _get_users_to_notify(self, exc_type): + exc_type.ensure_one() + return ( + exc_type.notify_on_process_error_groups_ids.users + | exc_type.notify_on_process_error_users_ids + ) diff --git a/edi_notification_oca/data/mail_activity_data.xml b/edi_notification_oca/data/mail_activity_data.xml new file mode 100644 index 000000000..1bf2c1c88 --- /dev/null +++ b/edi_notification_oca/data/mail_activity_data.xml @@ -0,0 +1,12 @@ + + + + EDI Exchange Record: Failed + fa-warning + edi.exchange.record + warning + + diff --git a/edi_notification_oca/models/__init__.py b/edi_notification_oca/models/__init__.py new file mode 100644 index 000000000..6128f744d --- /dev/null +++ b/edi_notification_oca/models/__init__.py @@ -0,0 +1,2 @@ +from . import edi_exchange_type +from . import edi_exchange_record diff --git a/edi_notification_oca/models/edi_exchange_record.py b/edi_notification_oca/models/edi_exchange_record.py new file mode 100644 index 000000000..a1279f4aa --- /dev/null +++ b/edi_notification_oca/models/edi_exchange_record.py @@ -0,0 +1,11 @@ +# Copyright 2024 Camptocamp SA +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + + +from odoo import models + + +class EDIExchangeRecord(models.Model): + + _name = "edi.exchange.record" + _inherit = ["edi.exchange.record", "mail.activity.mixin"] diff --git a/edi_notification_oca/models/edi_exchange_type.py b/edi_notification_oca/models/edi_exchange_type.py new file mode 100644 index 000000000..037f430ee --- /dev/null +++ b/edi_notification_oca/models/edi_exchange_type.py @@ -0,0 +1,52 @@ +# Copyright 2024 Camptocamp SA +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + + +from odoo import api, fields, models + + +class EDIExchangeType(models.Model): + _inherit = "edi.exchange.type" + + notify_on_process_error = fields.Boolean( + help="If an error happens on process, a notification will be sent to all" + " selected users. If active, please select the specific groups and" + " specific users in the 'Notifications' page.", + default=False, + ) + notify_on_process_error_groups_ids = fields.Many2many( + comodel_name="res.groups", + string="Notify Groups On Process Error", + inverse="_inverse_notify_on_process_error_groups_users", + ) + notify_on_process_error_users_ids = fields.Many2many( + comodel_name="res.users", + string="Notify Users On Process Error", + inverse="_inverse_notify_on_process_error_groups_users", + help="Select users to send notifications to. If 'Notification Groups' " + "have been selected, notifications will also be sent to users selected in here.", + ) + notify_on_process_error_activity_type_id = fields.Many2one( + "mail.activity.type", + string="Activity Type Used When Notify On Process Error", + default=lambda self: self._default_notify_on_process_error_activity_type_id(), + ) + + def _default_notify_on_process_error_activity_type_id(self): + return self.env.ref( + "edi_notification_oca.mail_activity_failed_exchange_record_warning", False + ) + + @api.onchange("notify_on_process_error") + def _onchange_notify_on_process_error(self): + if not self.notify_on_process_error: + self.notify_on_process_error_groups_ids = None + self.notify_on_process_error_users_ids = None + + def _inverse_notify_on_process_error_groups_users(self): + for rec in self: + if ( + rec.notify_on_process_error_groups_ids + or rec.notify_on_process_error_users_ids + ): + rec.notify_on_process_error = True diff --git a/edi_notification_oca/readme/CONTRIBUTORS.rst b/edi_notification_oca/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..7b3f8625e --- /dev/null +++ b/edi_notification_oca/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Duong (Tran Quoc) +* Simone Orsi diff --git a/edi_notification_oca/readme/CREDITS.rst b/edi_notification_oca/readme/CREDITS.rst new file mode 100644 index 000000000..ac19123b0 --- /dev/null +++ b/edi_notification_oca/readme/CREDITS.rst @@ -0,0 +1 @@ +The creation of this module was financially supported by Camptocamp. diff --git a/edi_notification_oca/readme/DESCRIPTION.rst b/edi_notification_oca/readme/DESCRIPTION.rst new file mode 100644 index 000000000..46a845420 --- /dev/null +++ b/edi_notification_oca/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module provides sending notification feature when exchange record. diff --git a/edi_notification_oca/static/description/icon.png b/edi_notification_oca/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2&DmGFW_9kP&%?X4}+xWi)( z;)z%wI5>D4a*5XwD)P--sPkoY(a~WBw;E~AW`Yue4kFa^LM3X`8x|}ZUeMnqr}>kH zG%WWW>3ml$Yez?i%)2pbKPI7?5o?hydokgQyZsNEr{a|mLdt;X2TX(#B1j35xPnPW z*bMSSOauW>o;*=kO8ojw91VX!qoOQb)zHJ!odWB}d+*K?#sY_jqPdg{Sm2HdYzdEx zOGVPhVRTGPtv0o}RfVP;Nd(|CB)I;*t&QO8h zFfekr30S!-LHmV_Su-W+rEwYXJ^;6&3|L$mMC8*bQptyOo9;>Qb9Q9`ySe3%V$A*9 zeKEe+b0{#KWGp$F+tga)0RtI)nhMa-K@JS}2krK~n8vJ=Ngm?R!9G<~RyuU0d?nz# z-5EK$o(!F?hmX*2Yt6+coY`6jGbb7tF#6nHA zuKk=GGJ;ZwON1iAfG$E#Y7MnZVmrY|j0eVI(DN_MNFJmyZ|;w4tf@=CCDZ#5N_0K= z$;R~bbk?}TpfDjfB&aiQ$VA}s?P}xPERJG{kxk5~R`iRS(SK5d+Xs9swCozZISbnS zk!)I0>t=A<-^z(cmSFz3=jZ23u13X><0b)P)^1T_))Kr`e!-pb#q&J*Q`p+B6la%C zuVl&0duN<;uOsB3%T9Fp8t{ED108<+W(nOZd?gDnfNBC3>M8WE61$So|P zVvqH0SNtDTcsUdzaMDpT=Ty0pDHHNL@Z0w$Y`XO z2M-_r1S+GaH%pz#Uy0*w$Vdl=X=rQXEzO}d6J^R6zjM1u&c9vYLvLp?W7w(?np9x1 zE_0JSAJCPB%i7p*Wvg)pn5T`8k3-uR?*NT|J`eS#_#54p>!p(mLDvmc-3o0mX*mp_ zN*AeS<>#^-{S%W<*mz^!X$w_2dHWpcJ6^j64qFBft-o}o_Vx80o0>}Du;>kLts;$8 zC`7q$QI(dKYG`Wa8#wl@V4jVWBRGQ@1dr-hstpQL)Tl+aqVpGpbSfN>5i&QMXfiZ> zaA?T1VGe?rpQ@;+pkrVdd{klI&jVS@I5_iz!=UMpTsa~mBga?1r}aRBm1WS;TT*s0f0lY=JBl66Upy)-k4J}lh=P^8(SXk~0xW=T9v*B|gzIhN z>qsO7dFd~mgxAy4V?&)=5ieYq?zi?ZEoj)&2o)RLy=@hbCRcfT5jigwtQGE{L*8<@Yd{zg;CsL5mvzfDY}P-wos_6PfprFVaeqNE%h zKZhLtcQld;ZD+>=nqN~>GvROfueSzJD&BE*}XfU|H&(FssBqY=hPCt`d zH?@s2>I(|;fcW&YM6#V#!kUIP8$Nkdh0A(bEVj``-AAyYgwY~jB zT|I7Bf@%;7aL7Wf4dZ%VqF$eiaC38OV6oy3Z#TER2G+fOCd9Iaoy6aLYbPTN{XRPz z;U!V|vBf%H!}52L2gH_+j;`bTcQRXB+y9onc^wLm5wi3-Be}U>k_u>2Eg$=k!(l@I zcCg+flakT2Nej3i0yn+g+}%NYb?ta;R?(g5SnwsQ49U8Wng8d|{B+lyRcEDvR3+`O{zfmrmvFrL6acVP%yG98X zo&+VBg@px@i)%o?dG(`T;n*$S5*rnyiR#=wW}}GsAcfyQpE|>a{=$Hjg=-*_K;UtD z#z-)AXwSRY?OPefw^iI+ z)AXz#PfEjlwTes|_{sB?4(O@fg0AJ^g8gP}ex9Ucf*@_^J(s_5jJV}c)s$`Myn|Kd z$6>}#q^n{4vN@+Os$m7KV+`}c%4)4pv@06af4-x5#wj!KKb%caK{A&Y#Rfs z-po?Dcb1({W=6FKIUirH&(yg=*6aLCekcKwyfK^JN5{wcA3nhO(o}SK#!CINhI`-I z1)6&n7O&ZmyFMuNwvEic#IiOAwNkR=u5it{B9n2sAJV5pNhar=j5`*N!Na;c7g!l$ z3aYBqUkqqTJ=Re-;)s!EOeij=7SQZ3Hq}ZRds%IM*PtM$wV z@;rlc*NRK7i3y5BETSKuumEN`Xu_8GP1Ri=OKQ$@I^ko8>H6)4rjiG5{VBM>B|%`&&s^)jS|-_95&yc=GqjNo{zFkw%%HHhS~e=s zD#sfS+-?*t|J!+ozP6KvtOl!R)@@-z24}`9{QaVLD^9VCSR2b`b!KC#o;Ki<+wXB6 zx3&O0LOWcg4&rv4QG0)4yb}7BFSEg~=IR5#ZRj8kg}dS7_V&^%#Do==#`u zpy6{ox?jWuR(;pg+f@mT>#HGWHAJRRDDDv~@(IDw&R>9643kK#HN`!1vBJHnC+RM&yIh8{gG2q zA%e*U3|N0XSRa~oX-3EAneep)@{h2vvd3Xvy$7og(sayr@95+e6~Xvi1tUqnIxoIH zVWo*OwYElb#uyW{Imam6f2rGbjR!Y3`#gPqkv57dB6K^wRGxc9B(t|aYDGS=m$&S!NmCtrMMaUg(c zc2qC=2Z`EEFMW-me5B)24AqF*bV5Dr-M5ig(l-WPS%CgaPzs6p_gnCIvTJ=Y<6!gT zVt@AfYCzjjsMEGi=rDQHo0yc;HqoRNnNFeWZgcm?f;cp(6CNylj36DoL(?TS7eU#+ z7&mfr#y))+CJOXQKUMZ7QIdS9@#-}7y2K1{8)cCt0~-X0O!O?Qx#E4Og+;A2SjalQ zs7r?qn0H044=sDN$SRG$arw~n=+T_DNdSrarmu)V6@|?1-ZB#hRn`uilTGPJ@fqEy zGt(f0B+^JDP&f=r{#Y_wi#AVDf-y!RIXU^0jXsFpf>=Ji*TeqSY!H~AMbJdCGLhC) zn7Rx+sXw6uYj;WRYrLd^5IZq@6JI1C^YkgnedZEYy<&4(z%Q$5yv#Boo{AH8n$a zhb4Y3PWdr269&?V%uI$xMcUrMzl=;w<_nm*qr=c3Rl@i5wWB;e-`t7D&c-mcQl7x! zZWB`UGcw=Y2=}~wzrfLx=uet<;m3~=8I~ZRuzvMQUQdr+yTV|ATf1Uuomr__nDf=X zZ3WYJtHp_ri(}SQAPjv+Y+0=fH4krOP@S&=zZ-t1jW1o@}z;xk8 z(Nz1co&El^HK^NrhVHa-_;&88vTU>_J33=%{if;BEY*J#1n59=07jrGQ#IP>@u#3A z;!q+E1Rj3ZJ+!4bq9F8PXJ@yMgZL;>&gYA0%_Kbi8?S=XGM~dnQZQ!yBSgcZhY96H zrWnU;k)qy`rX&&xlDyA%(a1Hhi5CWkmg(`Gb%m(HKi-7Z!LKGRP_B8@`7&hdDy5n= z`OIxqxiVfX@OX1p(mQu>0Ai*v_cTMiw4qRt3~NBvr9oBy0)r>w3p~V0SCm=An6@3n)>@z!|o-$HvDK z|3D2ZMJkLE5loMKl6R^ez@Zz%S$&mbeoqH5`Bb){Ei21q&VP)hWS2tjShfFtGE+$z zzCR$P#uktu+#!w)cX!lWN1XU%K-r=s{|j?)Akf@q#3b#{6cZCuJ~gCxuMXRmI$nGtnH+-h z+GEi!*X=AP<|fG`1>MBdTb?28JYc=fGvAi2I<$B(rs$;eoJCyR6_bc~p!XR@O-+sD z=eH`-ye})I5ic1eL~TDmtfJ|8`0VJ*Yr=hNCd)G1p2MMz4C3^Mj?7;!w|Ly%JqmuW zlIEW^Ft%z?*|fpXda>Jr^1noFZEwFgVV%|*XhH@acv8rdGxeEX{M$(vG{Zw+x(ei@ zmfXb22}8-?Fi`vo-YVrTH*C?a8%M=Hv9MqVH7H^J$KsD?>!SFZ;ZsvnHr_gn=7acz z#W?0eCdVhVMWN12VV^$>WlQ?f;P^{(&pYTops|btm6aj>_Uz+hqpGwB)vWp0Cf5y< zft8-je~nn?W11plq}N)4A{l8I7$!ks_x$PXW-2XaRFswX_BnF{R#6YIwMhAgd5F9X zGmwdadS6(a^fjHtXg8=l?Rc0Sm%hk6E9!5cLVloEy4eh(=FwgP`)~I^5~pBEWo+F6 zSf2ncyMurJN91#cJTy_u8Y}@%!bq1RkGC~-bV@SXRd4F{R-*V`bS+6;W5vZ(&+I<9$;-V|eNfLa5n-6% z2(}&uGRF;p92eS*sE*oR$@pexaqr*meB)VhmIg@h{uzkk$9~qh#cHhw#>O%)b@+(| z^IQgqzuj~Sk(J;swEM-3TrJAPCq9k^^^`q{IItKBRXYe}e0Tdr=Huf7da3$l4PdpwWDop%^}n;dD#K4s#DYA8SHZ z&1!riV4W4R7R#C))JH1~axJ)RYnM$$lIR%6fIVA@zV{XVyx}C+a-Dt8Y9M)^KU0+H zR4IUb2CJ{Hg>CuaXtD50jB(_Tcx=Z$^WYu2u5kubqmwp%drJ6 z?Fo40g!Qd<-l=TQxqHEOuPX0;^z7iX?Ke^a%XT<13TA^5`4Xcw6D@Ur&VT&CUe0d} z1GjOVF1^L@>O)l@?bD~$wzgf(nxX1OGD8fEV?TdJcZc2KoUe|oP1#=$$7ee|xbY)A zDZq+cuTpc(fFdj^=!;{k03C69lMQ(|>uhRfRu%+!k&YOi-3|1QKB z z?n?eq1XP>p-IM$Z^C;2L3itnbJZAip*Zo0aw2bs8@(s^~*8T9go!%dHcAz2lM;`yp zD=7&xjFV$S&5uDaiScyD?B-i1ze`+CoRtz`Wn+Zl&#s4&}MO{@N!ufrzjG$B79)Y2d3tBk&)TxUTw@QS0TEL_?njX|@vq?Uz(nBFK5Pq7*xj#u*R&i|?7+6# z+|r_n#SW&LXhtheZdah{ZVoqwyT{D>MC3nkFF#N)xLi{p7J1jXlmVeb;cP5?e(=f# zuT7fvjSbjS781v?7{)-X3*?>tq?)Yd)~|1{BDS(pqC zC}~H#WXlkUW*H5CDOo<)#x7%RY)A;ShGhI5s*#cRDA8YgqG(HeKDx+#(ZQ?386dv! zlXCO)w91~Vw4AmOcATuV653fa9R$fyK8ul%rG z-wfS zihugoZyr38Im?Zuh6@RcF~t1anQu7>#lPpb#}4cOA!EM11`%f*07RqOVkmX{p~KJ9 z^zP;K#|)$`^Rb{rnHGH{~>1(fawV0*Z#)}M`m8-?ZJV<+e}s9wE# z)l&az?w^5{)`S(%MRzxdNqrs1n*-=jS^_jqE*5XDrA0+VE`5^*p3CuM<&dZEeCjoz zR;uu_H9ZPZV|fQq`Cyw4nscrVwi!fE6ciMmX$!_hN7uF;jjKG)d2@aC4ropY)8etW=xJvni)8eHi`H$%#zn^WJ5NLc-rqk|u&&4Z6fD_m&JfSI1Bvb?b<*n&sfl0^t z=HnmRl`XrFvMKB%9}>PaA`m-fK6a0(8=qPkWS5bb4=v?XcWi&hRY?O5HdulRi4?fN zlsJ*N-0Qw+Yic@s0(2uy%F@ib;GjXt01Fmx5XbRo6+n|pP(&nodMoap^z{~q ziEeaUT@Mxe3vJSfI6?uLND(CNr=#^W<1b}jzW58bIfyWTDle$mmS(|x-0|2UlX+9k zQ^EX7Nw}?EzVoBfT(-LT|=9N@^hcn-_p&sqG z&*oVs2JSU+N4ZD`FhCAWaS;>|wH2G*Id|?pa#@>tyxX`+4HyIArWDvVrX)2WAOQff z0qyHu&-S@i^MS-+j--!pr4fPBj~_8({~e1bfcl0wI1kaoN>mJL6KUPQm5N7lB(ui1 zE-o%kq)&djzWJ}ob<-GfDlkB;F31j-VHKvQUGQ3sp`CwyGJk_i!y^sD0fqC@$9|jO zOqN!r!8-p==F@ZVP=U$qSpY(gQ0)59P1&t@y?5rvg<}E+GB}26NYPp4f2YFQrQtot5mn3wu_qprZ=>Ig-$ zbW26Ws~IgY>}^5w`vTB(G`PTZaDiGBo5o(tp)qli|NeV( z@H_=R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/edi_notification_oca/static/description/index.html b/edi_notification_oca/static/description/index.html new file mode 100644 index 000000000..0f7ec18e4 --- /dev/null +++ b/edi_notification_oca/static/description/index.html @@ -0,0 +1,435 @@ + + + + + +EDI Notification + + + +
+

EDI Notification

+ + +

Alpha License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

+

This module provides sending notification feature when exchange record.

+
+

Important

+

This is an alpha version, the data model and design can change at any time without warning. +Only for development or testing purpose, do not use in production. +More details on development status

+
+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Camptocamp
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+

The creation of this module was financially supported by Camptocamp.

+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/edi-framework project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/edi_notification_oca/tests/__init__.py b/edi_notification_oca/tests/__init__.py new file mode 100644 index 000000000..ab8b6e8bd --- /dev/null +++ b/edi_notification_oca/tests/__init__.py @@ -0,0 +1 @@ +from . import test_edi_notification diff --git a/edi_notification_oca/tests/test_edi_notification.py b/edi_notification_oca/tests/test_edi_notification.py new file mode 100644 index 000000000..3e2e958a3 --- /dev/null +++ b/edi_notification_oca/tests/test_edi_notification.py @@ -0,0 +1,176 @@ +# Copyright 2024 Camptocamp SA +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + + +import base64 + +from odoo.tests.common import RecordCapturer + +from odoo.addons.edi_oca.tests.common import EDIBackendCommonComponentRegistryTestCase +from odoo.addons.edi_oca.tests.fake_components import FakeInputProcess + + +class TestEDINotification(EDIBackendCommonComponentRegistryTestCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls._setup_env() + cls._build_components( + cls, + FakeInputProcess, + ) + cls._load_module_components(cls, "edi_notification_oca") + vals = { + "model": cls.partner._name, + "res_id": cls.partner.id, + "exchange_file": base64.b64encode(b"1234"), + } + cls.record = cls.backend.create_record("test_csv_input", vals) + cls.group_portal = cls.env.ref("base.group_portal") + cls.user_a = cls._create_user(cls, "A") + cls.user_b = cls._create_user(cls, "B") + cls.user_c = cls._create_user(cls, "C") + + def setUp(self): + super().setUp() + FakeInputProcess.reset_faked() + + def _create_user(self, letter): + return ( + self.env["res.users"] + .with_context(no_reset_password=True) + .create( + { + "name": "User %s" % letter, + "login": "user_%s" % letter, + "groups_id": [(6, 0, [self.group_portal.id])], + } + ) + ) + + def test_inverse_notify_on_process_error(self): + self.exchange_type_in.notify_on_process_error = False + # If we forgot to enable notify_on_process_error + self.exchange_type_in.write( + { + "notify_on_process_error_groups_ids": [(6, 0, [self.group_portal.id])], + "notify_on_process_error_users_ids": [(6, 0, [self.user_c.id])], + } + ) + # Make sure notify_on_process_error should be enabled + self.assertTrue(self.exchange_type_in.notify_on_process_error) + + def test_dont_notify_on_process_error(self): + self.exchange_type_in.notify_on_process_error = False + self.record.write({"edi_exchange_state": "input_received"}) + self.record._set_file_content("TEST %d" % self.record.id) + with RecordCapturer(self.env["mail.activity"], []) as capture: + self.record.with_context( + test_break_process="OOPS! Something went wrong :(" + ).action_exchange_process() + self.assertRecordValues( + self.record, + [ + { + "edi_exchange_state": "input_processed_error", + } + ], + ) + self.assertIn("OOPS! Something went wrong :(", self.record.exchange_error) + # We don't expect any notification + self.assertEqual(len(capture.records), 0) + + def test_notify_on_process_error_to_group(self): + self.exchange_type_in.write( + { + "notify_on_process_error": True, + "notify_on_process_error_groups_ids": [(6, 0, [self.group_portal.id])], + } + ) + # Remove group on user C to test + self.user_c.groups_id = None + self.record.write({"edi_exchange_state": "input_received"}) + self.record._set_file_content("TEST %d" % self.record.id) + with RecordCapturer(self.env["mail.activity"], []) as capture: + self.record.with_context( + test_break_process="OOPS! Something went wrong :(" + ).action_exchange_process() + # Send notification to all users in defined groups when error + a_noti = capture.records.filtered(lambda x: x.user_id == self.user_a) + self.assertEqual(len(a_noti), 1) + self.assertEqual( + a_noti.summary, + f"EDI: Process error on record '{self.record.identifier}'.", + ) + self.assertIn( + "OOPS! Something went wrong :(", + a_noti.note, + ) + b_noti = capture.records.filtered(lambda x: x.user_id == self.user_b) + self.assertEqual(len(a_noti), 1) + self.assertEqual( + b_noti.summary, + f"EDI: Process error on record '{self.record.identifier}'.", + ) + self.assertIn( + "OOPS! Something went wrong :(", + b_noti.note, + ) + # We don't send notification to user C + # because C is not belonging to the group_portal + c_noti = capture.records.filtered(lambda x: x.user_id == self.user_c) + self.assertEqual(len(c_noti), 0) + + def test_notify_on_process_error_to_users(self): + self.exchange_type_in.write( + { + "notify_on_process_error": True, + "notify_on_process_error_users_ids": [(6, 0, [self.user_c.id])], + } + ) + self.record.write({"edi_exchange_state": "input_received"}) + self.record._set_file_content("TEST %d" % self.record.id) + with RecordCapturer(self.env["mail.activity"], []) as capture: + self.record.with_context( + test_break_process="OOPS! Something went wrong :(" + ).action_exchange_process() + # Send notification to all users in defined users when error + a_b_noti = capture.records.filtered( + lambda x: x.user_id in (self.user_a | self.user_b) + ) + self.assertEqual(len(a_b_noti), 0) + c_noti = capture.records.filtered(lambda x: x.user_id == self.user_c) + self.assertEqual(len(c_noti), 1) + self.assertEqual( + c_noti.summary, + f"EDI: Process error on record '{self.record.identifier}'.", + ) + self.assertIn( + "OOPS! Something went wrong :(", + c_noti.note, + ) + + def test_notify_on_process_error_to_groups_and_users(self): + self.exchange_type_in.write( + { + "notify_on_process_error": True, + "notify_on_process_error_groups_ids": [(6, 0, [self.group_portal.id])], + "notify_on_process_error_users_ids": [(6, 0, [self.user_c.id])], + } + ) + # Remove group on user C to test + self.user_c.groups_id = None + self.record.write({"edi_exchange_state": "input_received"}) + self.record._set_file_content("TEST %d" % self.record.id) + with RecordCapturer(self.env["mail.activity"], []) as capture: + self.record.with_context( + test_break_process="OOPS! Something went wrong :(" + ).action_exchange_process() + # Send notification to all users in defined users when error + a_b_noti = capture.records.filtered( + lambda x: x.user_id in (self.user_a | self.user_b) + ) + self.assertEqual(len(a_b_noti), 2) + # also send notification to user C + c_noti = capture.records.filtered(lambda x: x.user_id == self.user_c) + self.assertEqual(len(c_noti), 1) diff --git a/edi_notification_oca/views/edi_exchange_type_views.xml b/edi_notification_oca/views/edi_exchange_type_views.xml new file mode 100644 index 000000000..58da40517 --- /dev/null +++ b/edi_notification_oca/views/edi_exchange_type_views.xml @@ -0,0 +1,36 @@ + + + + edi.exchange.type + + + + + + + + + + + + + + + + + From 52c6cca1bb1772b2b125ef07a10fe406fe4ef19c Mon Sep 17 00:00:00 2001 From: oca-ci Date: Thu, 25 Jul 2024 06:39:53 +0000 Subject: [PATCH 037/145] [UPD] Update edi_notification_oca.pot --- .../i18n/edi_notification_oca.pot | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 edi_notification_oca/i18n/edi_notification_oca.pot diff --git a/edi_notification_oca/i18n/edi_notification_oca.pot b/edi_notification_oca/i18n/edi_notification_oca.pot new file mode 100644 index 000000000..43162d14e --- /dev/null +++ b/edi_notification_oca/i18n/edi_notification_oca.pot @@ -0,0 +1,150 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * edi_notification_oca +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_ids +msgid "Activities" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_exception_decoration +msgid "Activity Exception Decoration" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_state +msgid "Activity State" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_type_icon +msgid "Activity Type Icon" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_type__notify_on_process_error_activity_type_id +msgid "Activity Type Used When Notify On Process Error" +msgstr "" + +#. module: edi_notification_oca +#: model:mail.activity.type,name:edi_notification_oca.mail_activity_failed_exchange_record_warning +msgid "EDI Exchange Record: Failed" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model,name:edi_notification_oca.model_edi_exchange_type +msgid "EDI Exchange Type" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model,name:edi_notification_oca.model_edi_exchange_record +msgid "EDI exchange Record" +msgstr "" + +#. module: edi_notification_oca +#. odoo-python +#: code:addons/edi_notification_oca/components/listener.py:0 +#, python-format +msgid "EDI: Process error on record '%(identifier)s'." +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_record__activity_type_icon +msgid "Font awesome icon e.g. fa-tasks" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_exception_icon +msgid "Icon" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_record__activity_exception_icon +msgid "Icon to indicate an exception activity." +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_type__notify_on_process_error +msgid "" +"If an error happens on process, a notification will be sent to all selected " +"users. If active, please select the specific groups and specific users in " +"the 'Notifications' page." +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__my_activity_date_deadline +msgid "My Activity Deadline" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_date_deadline +msgid "Next Activity Deadline" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_summary +msgid "Next Activity Summary" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_type_id +msgid "Next Activity Type" +msgstr "" + +#. module: edi_notification_oca +#: model_terms:ir.ui.view,arch_db:edi_notification_oca.edi_exchange_type_view_form +msgid "Notification" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_type__notify_on_process_error_groups_ids +msgid "Notify Groups On Process Error" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_type__notify_on_process_error +msgid "Notify On Process Error" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_type__notify_on_process_error_users_ids +msgid "Notify Users On Process Error" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_user_id +msgid "Responsible User" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_type__notify_on_process_error_users_ids +msgid "" +"Select users to send notifications to. If 'Notification Groups' have been " +"selected, notifications will also be sent to users selected in here." +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_record__activity_state +msgid "" +"Status based on activities\n" +"Overdue: Due date is already passed\n" +"Today: Activity date is today\n" +"Planned: Future activities." +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_record__activity_exception_decoration +msgid "Type of the exception activity on record." +msgstr "" From 4a3cb5d04a29bd410b9b72282fe530f3fd91d3cf Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 25 Jul 2024 06:42:54 +0000 Subject: [PATCH 038/145] [BOT] post-merge updates --- edi_notification_oca/README.rst | 2 +- edi_notification_oca/static/description/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/edi_notification_oca/README.rst b/edi_notification_oca/README.rst index 61d2bf64f..0953238f1 100644 --- a/edi_notification_oca/README.rst +++ b/edi_notification_oca/README.rst @@ -7,7 +7,7 @@ EDI Notification !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:430afb16d5a7fa86b62589b77b3caa51698cd52619a5a384aff592cb0892a3d0 + !! source digest: sha256:d8651cf2a0e90d542e65ce8083a2bccffd0b1a3549867bb7a8e91843bd62a770 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png diff --git a/edi_notification_oca/static/description/index.html b/edi_notification_oca/static/description/index.html index 0f7ec18e4..4e9ce77a0 100644 --- a/edi_notification_oca/static/description/index.html +++ b/edi_notification_oca/static/description/index.html @@ -367,7 +367,7 @@

EDI Notification

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:430afb16d5a7fa86b62589b77b3caa51698cd52619a5a384aff592cb0892a3d0 +!! source digest: sha256:d8651cf2a0e90d542e65ce8083a2bccffd0b1a3549867bb7a8e91843bd62a770 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Alpha License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

This module provides sending notification feature when exchange record.

From 2fd0bed2a68a82aa85006a57fdd7a11fb291586a Mon Sep 17 00:00:00 2001 From: mymage Date: Tue, 30 Jul 2024 12:13:25 +0000 Subject: [PATCH 039/145] Added translation using Weblate (Italian) --- edi_notification_oca/i18n/it.po | 151 ++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 edi_notification_oca/i18n/it.po diff --git a/edi_notification_oca/i18n/it.po b/edi_notification_oca/i18n/it.po new file mode 100644 index 000000000..442cbfe1b --- /dev/null +++ b/edi_notification_oca/i18n/it.po @@ -0,0 +1,151 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * edi_notification_oca +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_ids +msgid "Activities" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_exception_decoration +msgid "Activity Exception Decoration" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_state +msgid "Activity State" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_type_icon +msgid "Activity Type Icon" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_type__notify_on_process_error_activity_type_id +msgid "Activity Type Used When Notify On Process Error" +msgstr "" + +#. module: edi_notification_oca +#: model:mail.activity.type,name:edi_notification_oca.mail_activity_failed_exchange_record_warning +msgid "EDI Exchange Record: Failed" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model,name:edi_notification_oca.model_edi_exchange_type +msgid "EDI Exchange Type" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model,name:edi_notification_oca.model_edi_exchange_record +msgid "EDI exchange Record" +msgstr "" + +#. module: edi_notification_oca +#. odoo-python +#: code:addons/edi_notification_oca/components/listener.py:0 +#, python-format +msgid "EDI: Process error on record '%(identifier)s'." +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_record__activity_type_icon +msgid "Font awesome icon e.g. fa-tasks" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_exception_icon +msgid "Icon" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_record__activity_exception_icon +msgid "Icon to indicate an exception activity." +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_type__notify_on_process_error +msgid "" +"If an error happens on process, a notification will be sent to all selected " +"users. If active, please select the specific groups and specific users in " +"the 'Notifications' page." +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__my_activity_date_deadline +msgid "My Activity Deadline" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_date_deadline +msgid "Next Activity Deadline" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_summary +msgid "Next Activity Summary" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_type_id +msgid "Next Activity Type" +msgstr "" + +#. module: edi_notification_oca +#: model_terms:ir.ui.view,arch_db:edi_notification_oca.edi_exchange_type_view_form +msgid "Notification" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_type__notify_on_process_error_groups_ids +msgid "Notify Groups On Process Error" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_type__notify_on_process_error +msgid "Notify On Process Error" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_type__notify_on_process_error_users_ids +msgid "Notify Users On Process Error" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_user_id +msgid "Responsible User" +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_type__notify_on_process_error_users_ids +msgid "" +"Select users to send notifications to. If 'Notification Groups' have been " +"selected, notifications will also be sent to users selected in here." +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_record__activity_state +msgid "" +"Status based on activities\n" +"Overdue: Due date is already passed\n" +"Today: Activity date is today\n" +"Planned: Future activities." +msgstr "" + +#. module: edi_notification_oca +#: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_record__activity_exception_decoration +msgid "Type of the exception activity on record." +msgstr "" From b358172c3af34b13fc132ab36004765911e95e4c Mon Sep 17 00:00:00 2001 From: mymage Date: Tue, 10 Sep 2024 11:15:28 +0000 Subject: [PATCH 040/145] Translated using Weblate (Italian) Currently translated at 100.0% (25 of 25 strings) Translation: edi-framework-16.0/edi-framework-16.0-edi_notification_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-16-0/edi-framework-16-0-edi_notification_oca/it/ --- edi_notification_oca/i18n/it.po | 58 ++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/edi_notification_oca/i18n/it.po b/edi_notification_oca/i18n/it.po index 442cbfe1b..5a02a680f 100644 --- a/edi_notification_oca/i18n/it.po +++ b/edi_notification_oca/i18n/it.po @@ -6,75 +6,77 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2024-09-10 14:06+0000\n" +"Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.6.2\n" #. module: edi_notification_oca #: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_ids msgid "Activities" -msgstr "" +msgstr "Attività" #. module: edi_notification_oca #: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_exception_decoration msgid "Activity Exception Decoration" -msgstr "" +msgstr "Decorazione eccezione attività" #. module: edi_notification_oca #: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_state msgid "Activity State" -msgstr "" +msgstr "Stato attività" #. module: edi_notification_oca #: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_type_icon msgid "Activity Type Icon" -msgstr "" +msgstr "Icona tipo attività" #. module: edi_notification_oca #: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_type__notify_on_process_error_activity_type_id msgid "Activity Type Used When Notify On Process Error" -msgstr "" +msgstr "Tipo attività utilizzata nelle notifiche di errori di processo" #. module: edi_notification_oca #: model:mail.activity.type,name:edi_notification_oca.mail_activity_failed_exchange_record_warning msgid "EDI Exchange Record: Failed" -msgstr "" +msgstr "Record scambio EDI: fallito" #. module: edi_notification_oca #: model:ir.model,name:edi_notification_oca.model_edi_exchange_type msgid "EDI Exchange Type" -msgstr "" +msgstr "Tipo scambio EDI" #. module: edi_notification_oca #: model:ir.model,name:edi_notification_oca.model_edi_exchange_record msgid "EDI exchange Record" -msgstr "" +msgstr "Record di scambio EDI" #. module: edi_notification_oca #. odoo-python #: code:addons/edi_notification_oca/components/listener.py:0 #, python-format msgid "EDI: Process error on record '%(identifier)s'." -msgstr "" +msgstr "EDI: errore di processo nel record '%(identifier)s'." #. module: edi_notification_oca #: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_record__activity_type_icon msgid "Font awesome icon e.g. fa-tasks" -msgstr "" +msgstr "Icona Font Awesome es. fa-tasks" #. module: edi_notification_oca #: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_exception_icon msgid "Icon" -msgstr "" +msgstr "Icona" #. module: edi_notification_oca #: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_record__activity_exception_icon msgid "Icon to indicate an exception activity." -msgstr "" +msgstr "Icona per indicare un'attività eccezione." #. module: edi_notification_oca #: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_type__notify_on_process_error @@ -83,51 +85,54 @@ msgid "" "users. If active, please select the specific groups and specific users in " "the 'Notifications' page." msgstr "" +"Se si verifica un errore durante il processo, verrà inviata una notifica a " +"tutti gli utenti selezionati. Se attiva, selezionare i gruppi e gli utenti " +"specifici nella pagina \"Notifiche\"." #. module: edi_notification_oca #: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__my_activity_date_deadline msgid "My Activity Deadline" -msgstr "" +msgstr "Scadenza mia attività" #. module: edi_notification_oca #: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_date_deadline msgid "Next Activity Deadline" -msgstr "" +msgstr "Scadenza prossima attività" #. module: edi_notification_oca #: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_summary msgid "Next Activity Summary" -msgstr "" +msgstr "Riepilogo prossima attività" #. module: edi_notification_oca #: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_type_id msgid "Next Activity Type" -msgstr "" +msgstr "Tipo prossima attività" #. module: edi_notification_oca #: model_terms:ir.ui.view,arch_db:edi_notification_oca.edi_exchange_type_view_form msgid "Notification" -msgstr "" +msgstr "Notifica" #. module: edi_notification_oca #: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_type__notify_on_process_error_groups_ids msgid "Notify Groups On Process Error" -msgstr "" +msgstr "Avvisa i gruppi all'errore di processo" #. module: edi_notification_oca #: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_type__notify_on_process_error msgid "Notify On Process Error" -msgstr "" +msgstr "Avvisa all'errore di processo" #. module: edi_notification_oca #: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_type__notify_on_process_error_users_ids msgid "Notify Users On Process Error" -msgstr "" +msgstr "Avvisa gli utenti all'errore di processo" #. module: edi_notification_oca #: model:ir.model.fields,field_description:edi_notification_oca.field_edi_exchange_record__activity_user_id msgid "Responsible User" -msgstr "" +msgstr "Utente responsabile" #. module: edi_notification_oca #: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_type__notify_on_process_error_users_ids @@ -135,6 +140,9 @@ msgid "" "Select users to send notifications to. If 'Notification Groups' have been " "selected, notifications will also be sent to users selected in here." msgstr "" +"Seleziona gli utenti a cui inviare le notifiche. Se sono stati selezionati " +"'Gruppi di notifica', le notifiche saranno inviate anche agli utenti " +"selezionati qui." #. module: edi_notification_oca #: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_record__activity_state @@ -144,8 +152,12 @@ msgid "" "Today: Activity date is today\n" "Planned: Future activities." msgstr "" +"Stato in base alle attività\n" +"Scaduto: la data richiesta è trascorsa\n" +"Oggi: la data attività è oggi\n" +"Pianificato: attività future." #. module: edi_notification_oca #: model:ir.model.fields,help:edi_notification_oca.field_edi_exchange_record__activity_exception_decoration msgid "Type of the exception activity on record." -msgstr "" +msgstr "Tipo di attività eccezione sul record." From fa0985aa0b4d949484194a3ff189217618ed43a9 Mon Sep 17 00:00:00 2001 From: SilvioC2C Date: Wed, 18 Mar 2026 15:46:37 +0100 Subject: [PATCH 041/145] [IMP] edi_notification_oca: pre-commit auto fixes --- edi_notification_oca/README.rst | 22 +++++++++---------- .../data/mail_activity_data.xml | 12 +++++----- .../models/edi_exchange_record.py | 1 - edi_notification_oca/pyproject.toml | 3 +++ edi_notification_oca/readme/CONTRIBUTORS.md | 2 ++ edi_notification_oca/readme/CONTRIBUTORS.rst | 2 -- .../readme/{CREDITS.rst => CREDITS.md} | 0 .../{DESCRIPTION.rst => DESCRIPTION.md} | 0 .../static/description/index.html | 6 ++--- 9 files changed, 25 insertions(+), 23 deletions(-) create mode 100644 edi_notification_oca/pyproject.toml create mode 100644 edi_notification_oca/readme/CONTRIBUTORS.md delete mode 100644 edi_notification_oca/readme/CONTRIBUTORS.rst rename edi_notification_oca/readme/{CREDITS.rst => CREDITS.md} (100%) rename edi_notification_oca/readme/{DESCRIPTION.rst => DESCRIPTION.md} (100%) diff --git a/edi_notification_oca/README.rst b/edi_notification_oca/README.rst index 0953238f1..3ea1c4c32 100644 --- a/edi_notification_oca/README.rst +++ b/edi_notification_oca/README.rst @@ -17,13 +17,13 @@ EDI Notification :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi--framework-lightgray.png?logo=github - :target: https://github.com/OCA/edi-framework/tree/16.0/edi_notification_oca + :target: https://github.com/OCA/edi-framework/tree/18.0/edi_notification_oca :alt: OCA/edi-framework .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/edi-framework-16-0/edi-framework-16-0-edi_notification_oca + :target: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_notification_oca :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -46,7 +46,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -54,23 +54,23 @@ Credits ======= Authors -~~~~~~~ +------- * Camptocamp Contributors -~~~~~~~~~~~~ +------------ -* Duong (Tran Quoc) -* Simone Orsi +- Duong (Tran Quoc) +- Simone Orsi Other credits -~~~~~~~~~~~~~ +------------- The creation of this module was financially supported by Camptocamp. Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -82,6 +82,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/edi-framework `_ project on GitHub. +This module is part of the `OCA/edi-framework `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/edi_notification_oca/data/mail_activity_data.xml b/edi_notification_oca/data/mail_activity_data.xml index 1bf2c1c88..7fa92c0d4 100644 --- a/edi_notification_oca/data/mail_activity_data.xml +++ b/edi_notification_oca/data/mail_activity_data.xml @@ -1,12 +1,12 @@ - - EDI Exchange Record: Failed - fa-warning - edi.exchange.record - warning - + EDI Exchange Record: Failed + fa-warning + edi.exchange.record + warning + diff --git a/edi_notification_oca/models/edi_exchange_record.py b/edi_notification_oca/models/edi_exchange_record.py index a1279f4aa..629c7c4df 100644 --- a/edi_notification_oca/models/edi_exchange_record.py +++ b/edi_notification_oca/models/edi_exchange_record.py @@ -6,6 +6,5 @@ class EDIExchangeRecord(models.Model): - _name = "edi.exchange.record" _inherit = ["edi.exchange.record", "mail.activity.mixin"] diff --git a/edi_notification_oca/pyproject.toml b/edi_notification_oca/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/edi_notification_oca/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/edi_notification_oca/readme/CONTRIBUTORS.md b/edi_notification_oca/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..289708028 --- /dev/null +++ b/edi_notification_oca/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- Duong (Tran Quoc) \<\> +- Simone Orsi \<\> diff --git a/edi_notification_oca/readme/CONTRIBUTORS.rst b/edi_notification_oca/readme/CONTRIBUTORS.rst deleted file mode 100644 index 7b3f8625e..000000000 --- a/edi_notification_oca/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,2 +0,0 @@ -* Duong (Tran Quoc) -* Simone Orsi diff --git a/edi_notification_oca/readme/CREDITS.rst b/edi_notification_oca/readme/CREDITS.md similarity index 100% rename from edi_notification_oca/readme/CREDITS.rst rename to edi_notification_oca/readme/CREDITS.md diff --git a/edi_notification_oca/readme/DESCRIPTION.rst b/edi_notification_oca/readme/DESCRIPTION.md similarity index 100% rename from edi_notification_oca/readme/DESCRIPTION.rst rename to edi_notification_oca/readme/DESCRIPTION.md diff --git a/edi_notification_oca/static/description/index.html b/edi_notification_oca/static/description/index.html index 4e9ce77a0..e1cd25ca1 100644 --- a/edi_notification_oca/static/description/index.html +++ b/edi_notification_oca/static/description/index.html @@ -369,7 +369,7 @@

EDI Notification

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:d8651cf2a0e90d542e65ce8083a2bccffd0b1a3549867bb7a8e91843bd62a770 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Alpha License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

+

Alpha License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

This module provides sending notification feature when exchange record.

Important

@@ -395,7 +395,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -426,7 +426,7 @@

Maintainers

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/edi-framework project on GitHub.

+

This module is part of the OCA/edi-framework project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

From 358ea61c983fa8cb88b8864f5b3b22073727ec97 Mon Sep 17 00:00:00 2001 From: SilvioC2C Date: Wed, 18 Mar 2026 16:02:55 +0100 Subject: [PATCH 042/145] [MIG] edi_notification_oca: Migration to 18.0 --- edi_notification_oca/README.rst | 18 ++++++++++----- edi_notification_oca/__manifest__.py | 9 ++++---- edi_notification_oca/components/listener.py | 4 +--- ...tivity_data.xml => mail_activity_type.xml} | 0 .../models/edi_exchange_record.py | 1 - .../models/edi_exchange_type.py | 6 ++--- edi_notification_oca/readme/CREDITS.md | 1 - edi_notification_oca/readme/DESCRIPTION.md | 11 +++++++++- .../static/description/index.html | 22 ++++++++++++------- .../tests/test_edi_notification.py | 17 +++++++------- ...e_type_views.xml => edi_exchange_type.xml} | 8 +++---- 11 files changed, 57 insertions(+), 40 deletions(-) rename edi_notification_oca/data/{mail_activity_data.xml => mail_activity_type.xml} (100%) delete mode 100644 edi_notification_oca/readme/CREDITS.md rename edi_notification_oca/views/{edi_exchange_type_views.xml => edi_exchange_type.xml} (75%) diff --git a/edi_notification_oca/README.rst b/edi_notification_oca/README.rst index 3ea1c4c32..79b243d20 100644 --- a/edi_notification_oca/README.rst +++ b/edi_notification_oca/README.rst @@ -28,7 +28,18 @@ EDI Notification |badge1| |badge2| |badge3| |badge4| |badge5| -This module provides sending notification feature when exchange record. +This module creates activities for users when an exchange record's +process fails. + +Exchange types must be configured properly to create such activities: + +- field "Notify On Process Error" must be checked to activate the + feature for the current exchange type +- field "Activity Type Used When Notify On Process Error" is used to + define the type of the newly created activity +- fields "Notify Groups On Process Error" and "Notify Users On Process + Error" are used to define the users that will be assigned to the + newly created activity .. IMPORTANT:: This is an alpha version, the data model and design can change at any time without warning. @@ -64,11 +75,6 @@ Contributors - Duong (Tran Quoc) - Simone Orsi -Other credits -------------- - -The creation of this module was financially supported by Camptocamp. - Maintainers ----------- diff --git a/edi_notification_oca/__manifest__.py b/edi_notification_oca/__manifest__.py index f3696bc1d..5fc8183f9 100644 --- a/edi_notification_oca/__manifest__.py +++ b/edi_notification_oca/__manifest__.py @@ -4,14 +4,13 @@ { "name": "EDI Notification", "summary": """Define notification activities on exchange records.""", - "version": "16.0.1.0.0", + "version": "18.0.1.0.0", "development_status": "Alpha", "license": "LGPL-3", "website": "https://github.com/OCA/edi-framework", "author": "Camptocamp,Odoo Community Association (OCA)", - "depends": [ - "edi_oca", - ], - "data": ["data/mail_activity_data.xml", "views/edi_exchange_type_views.xml"], + # TODO v19: consider getting rid off `edi_component_oca` dep + "depends": ["edi_core_oca", "edi_component_oca"], + "data": ["data/mail_activity_type.xml", "views/edi_exchange_type.xml"], "installable": True, } diff --git a/edi_notification_oca/components/listener.py b/edi_notification_oca/components/listener.py index 4dcb9b138..30945e128 100644 --- a/edi_notification_oca/components/listener.py +++ b/edi_notification_oca/components/listener.py @@ -1,8 +1,6 @@ # Copyright 2024 Camptocamp SA # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import _ - from odoo.addons.component.core import Component @@ -28,7 +26,7 @@ def on_edi_exchange_error(self, record): for user in users: record.activity_schedule( activity_type_id=activity_type.id, - summary=_( + summary=self.env._( "EDI: Process error on record '%(identifier)s'.", identifier=record.identifier, ), diff --git a/edi_notification_oca/data/mail_activity_data.xml b/edi_notification_oca/data/mail_activity_type.xml similarity index 100% rename from edi_notification_oca/data/mail_activity_data.xml rename to edi_notification_oca/data/mail_activity_type.xml diff --git a/edi_notification_oca/models/edi_exchange_record.py b/edi_notification_oca/models/edi_exchange_record.py index 629c7c4df..e6b48bc68 100644 --- a/edi_notification_oca/models/edi_exchange_record.py +++ b/edi_notification_oca/models/edi_exchange_record.py @@ -1,7 +1,6 @@ # Copyright 2024 Camptocamp SA # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - from odoo import models diff --git a/edi_notification_oca/models/edi_exchange_type.py b/edi_notification_oca/models/edi_exchange_type.py index 037f430ee..3f29d606e 100644 --- a/edi_notification_oca/models/edi_exchange_type.py +++ b/edi_notification_oca/models/edi_exchange_type.py @@ -1,7 +1,6 @@ # Copyright 2024 Camptocamp SA # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - from odoo import api, fields, models @@ -23,8 +22,9 @@ class EDIExchangeType(models.Model): comodel_name="res.users", string="Notify Users On Process Error", inverse="_inverse_notify_on_process_error_groups_users", - help="Select users to send notifications to. If 'Notification Groups' " - "have been selected, notifications will also be sent to users selected in here.", + help="Select users to send notifications to." + " If 'Notification Groups' have been selected, notifications will also be sent" + " to users selected in here.", ) notify_on_process_error_activity_type_id = fields.Many2one( "mail.activity.type", diff --git a/edi_notification_oca/readme/CREDITS.md b/edi_notification_oca/readme/CREDITS.md deleted file mode 100644 index ac19123b0..000000000 --- a/edi_notification_oca/readme/CREDITS.md +++ /dev/null @@ -1 +0,0 @@ -The creation of this module was financially supported by Camptocamp. diff --git a/edi_notification_oca/readme/DESCRIPTION.md b/edi_notification_oca/readme/DESCRIPTION.md index 46a845420..3f250b798 100644 --- a/edi_notification_oca/readme/DESCRIPTION.md +++ b/edi_notification_oca/readme/DESCRIPTION.md @@ -1 +1,10 @@ -This module provides sending notification feature when exchange record. +This module creates activities for users when an exchange record's process fails. + +Exchange types must be configured properly to create such activities: + +- field "Notify On Process Error" must be checked to activate the feature + for the current exchange type +- field "Activity Type Used When Notify On Process Error" is used to define + the type of the newly created activity +- fields "Notify Groups On Process Error" and "Notify Users On Process Error" are used + to define the users that will be assigned to the newly created activity diff --git a/edi_notification_oca/static/description/index.html b/edi_notification_oca/static/description/index.html index e1cd25ca1..0120c593b 100644 --- a/edi_notification_oca/static/description/index.html +++ b/edi_notification_oca/static/description/index.html @@ -370,7 +370,18 @@

EDI Notification

!! source digest: sha256:d8651cf2a0e90d542e65ce8083a2bccffd0b1a3549867bb7a8e91843bd62a770 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Alpha License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

-

This module provides sending notification feature when exchange record.

+

This module creates activities for users when an exchange record’s +process fails.

+

Exchange types must be configured properly to create such activities:

+
    +
  • field “Notify On Process Error” must be checked to activate the +feature for the current exchange type
  • +
  • field “Activity Type Used When Notify On Process Error” is used to +define the type of the newly created activity
  • +
  • fields “Notify Groups On Process Error” and “Notify Users On Process +Error” are used to define the users that will be assigned to the +newly created activity
  • +

Important

This is an alpha version, the data model and design can change at any time without warning. @@ -384,8 +395,7 @@

EDI Notification

  • Credits
  • @@ -413,12 +423,8 @@

    Contributors

  • Simone Orsi <simone.orsi@camptocamp.com>
  • -
    -

    Other credits

    -

    The creation of this module was financially supported by Camptocamp.

    -
    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association diff --git a/edi_notification_oca/tests/test_edi_notification.py b/edi_notification_oca/tests/test_edi_notification.py index 3e2e958a3..cd9ee4f88 100644 --- a/edi_notification_oca/tests/test_edi_notification.py +++ b/edi_notification_oca/tests/test_edi_notification.py @@ -27,23 +27,24 @@ def setUpClass(cls): } cls.record = cls.backend.create_record("test_csv_input", vals) cls.group_portal = cls.env.ref("base.group_portal") - cls.user_a = cls._create_user(cls, "A") - cls.user_b = cls._create_user(cls, "B") - cls.user_c = cls._create_user(cls, "C") + cls.user_a = cls._create_user("A") + cls.user_b = cls._create_user("B") + cls.user_c = cls._create_user("C") def setUp(self): super().setUp() FakeInputProcess.reset_faked() - def _create_user(self, letter): + @classmethod + def _create_user(cls, letter: str): return ( - self.env["res.users"] + cls.env["res.users"] .with_context(no_reset_password=True) .create( { - "name": "User %s" % letter, - "login": "user_%s" % letter, - "groups_id": [(6, 0, [self.group_portal.id])], + "name": f"User {letter}", + "login": f"user_{letter}", + "groups_id": [(6, 0, [cls.group_portal.id])], } ) ) diff --git a/edi_notification_oca/views/edi_exchange_type_views.xml b/edi_notification_oca/views/edi_exchange_type.xml similarity index 75% rename from edi_notification_oca/views/edi_exchange_type_views.xml rename to edi_notification_oca/views/edi_exchange_type.xml index 58da40517..e052b6eb5 100644 --- a/edi_notification_oca/views/edi_exchange_type_views.xml +++ b/edi_notification_oca/views/edi_exchange_type.xml @@ -11,22 +11,22 @@ From 0d91f71638914557d4b1ecdb0dd79ee666816fe6 Mon Sep 17 00:00:00 2001 From: Ricardoalso Date: Fri, 13 Feb 2026 10:12:47 +0100 Subject: [PATCH 043/145] [IMP] edi_core_oca: add backend-controlled auto-cleanup for exchange records Add configurable auto-archiving and auto-deletion of EDI exchange records per backend. This backend-specific settings that can be managed individually. Changes: - Add "Auto Cleanup" tab in backend form view for easy configuration - Add archive cron job that respect backend-specific retention policies - Add delete cron job that respect backend-specific retention policies - Add "Archived" filter to exchange record search view Benefits: - Each backend can have different retention policies - Setting fields to 0 (default value) disables the respective cleanup behavior - More flexible data retention management - Better control over storage and performance optimization The cron jobs iterate through backends with configured retention settings, applying appropriate cutoff values. chore(edi_core_oca): update documentation --- edi_core_oca/README.rst | 28 +++++++++++++++++-- edi_core_oca/__manifest__.py | 2 ++ .../data/ir_cron_archive_old_edi_records.xml | 27 ++++++++++++++++++ ...r_cron_delete_old_archived_edi_records.xml | 27 ++++++++++++++++++ edi_core_oca/models/edi_backend.py | 12 ++++++++ edi_core_oca/models/edi_exchange_record.py | 1 + edi_core_oca/views/edi_backend_views.xml | 9 +++++- .../views/edi_exchange_record_views.xml | 11 ++++++++ 8 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 edi_core_oca/data/ir_cron_archive_old_edi_records.xml create mode 100644 edi_core_oca/data/ir_cron_delete_old_archived_edi_records.xml diff --git a/edi_core_oca/README.rst b/edi_core_oca/README.rst index f6f7f6077..d8ededb9b 100644 --- a/edi_core_oca/README.rst +++ b/edi_core_oca/README.rst @@ -6,7 +6,7 @@ EDI === -.. +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! @@ -64,6 +64,30 @@ In order to define a new Exchange Record, we need to configure: - Backend - Components +Exchange Records Retention +--------------------------- + +Configure automatic archiving and deletion of old exchange records per backend +to manage data retention and optimize performance. + +Go to an EDI Backend form and open the **Auto Cleanup** tab. Two fields are +available: + +- **Auto-archive records after (days)**: Archives exchange records older than + the specified number of days. Set to 0 to disable. + +- **Auto-delete archived records after (days)**: Permanently deletes archived + exchange records older than the specified number of days. Set to 0 to disable. + +Each backend can have different retention policies. Scheduled actions run +periodically to apply these settings: + +- Archive job runs daily +- Delete job runs every 3 hours + +To view archived records, use the "Archived" filter in the exchange records +search view. + Jobs ---- @@ -233,7 +257,7 @@ promote its widespread use. Current `maintainers `__: -|maintainer-simahawk| |maintainer-etobella| +|maintainer-simahawk| |maintainer-etobella| This module is part of the `OCA/edi-framework `_ project on GitHub. diff --git a/edi_core_oca/__manifest__.py b/edi_core_oca/__manifest__.py index 2f2f6a9f6..fe3f5400a 100644 --- a/edi_core_oca/__manifest__.py +++ b/edi_core_oca/__manifest__.py @@ -29,6 +29,8 @@ "data/ir_actions_server.xml", "data/sequence.xml", "data/edi_configuration.xml", + "data/ir_cron_archive_old_edi_records.xml", + "data/ir_cron_delete_old_archived_edi_records.xml", "security/res_groups.xml", "security/ir_model_access.xml", "views/edi_backend_views.xml", diff --git a/edi_core_oca/data/ir_cron_archive_old_edi_records.xml b/edi_core_oca/data/ir_cron_archive_old_edi_records.xml new file mode 100644 index 000000000..b1e8dc78d --- /dev/null +++ b/edi_core_oca/data/ir_cron_archive_old_edi_records.xml @@ -0,0 +1,27 @@ + + + + Archive Old EDI Exchange Records + + code + +# Archive old EDI exchange records based on backend configuration +backends = env['edi.backend'].search([ + ('auto_archive_records_after_days', '>', 0) +]) +for backend in backends: + cutoff_date = datetime.datetime.now() - datetime.timedelta(days=backend.auto_archive_records_after_days) + records = model.search([ + ('backend_id', '=', backend.id), + ('create_date', '<', cutoff_date), + ('active', '=', True) + ], limit=10000, order="create_date asc") + if records: + records.action_archive() + + 1 + days + + + + diff --git a/edi_core_oca/data/ir_cron_delete_old_archived_edi_records.xml b/edi_core_oca/data/ir_cron_delete_old_archived_edi_records.xml new file mode 100644 index 000000000..05d05a111 --- /dev/null +++ b/edi_core_oca/data/ir_cron_delete_old_archived_edi_records.xml @@ -0,0 +1,27 @@ + + + + Delete Old Archived EDI Exchange Records + + code + +# Delete old archived EDI exchange records based on backend configuration +backends = env['edi.backend'].search([ + ('auto_delete_records_after_days', '>', 0) +]) +for backend in backends: + cutoff_date = datetime.datetime.now() - datetime.timedelta(days=backend.auto_delete_records_after_days) + records = model.search([ + ('backend_id', '=', backend.id), + ('create_date', '<', cutoff_date), + ('active', '=', False) + ], limit=100, order="create_date asc") + if records: + records.unlink() + + 3 + hours + + + + diff --git a/edi_core_oca/models/edi_backend.py b/edi_core_oca/models/edi_backend.py index a8c6ce8bd..54c845480 100644 --- a/edi_core_oca/models/edi_backend.py +++ b/edi_core_oca/models/edi_backend.py @@ -62,6 +62,18 @@ class EDIBackend(models.Model): ) active = fields.Boolean(default=True) company_id = fields.Many2one("res.company", string="Company") + auto_archive_records_after_days = fields.Integer( + string="Auto-archive records after (days)", + default=0, + help="Automatically archive EDI exchange records after X days. " + "Set to <= 0 to disable auto-archiving.", + ) + auto_delete_records_after_days = fields.Integer( + string="Auto-delete archived records after (days)", + default=0, + help="Automatically delete archived EDI exchange records after X days. " + "Set to <= 0 to disable auto-deletion.", + ) @property def exchange_record_model(self): diff --git a/edi_core_oca/models/edi_exchange_record.py b/edi_core_oca/models/edi_exchange_record.py index c1fab6bc7..a87b4506e 100644 --- a/edi_core_oca/models/edi_exchange_record.py +++ b/edi_core_oca/models/edi_exchange_record.py @@ -144,6 +144,7 @@ class EDIExchangeRecord(models.Model): help="The record state can be rolled back manually in case of failure.", ) company_id = fields.Many2one("res.company", string="Company") + active = fields.Boolean(default=True) _sql_constraints = [ ("identifier_uniq", "unique(identifier)", "The identifier must be unique."), diff --git a/edi_core_oca/views/edi_backend_views.xml b/edi_core_oca/views/edi_backend_views.xml index 2f557e0d3..5c4aea4f4 100644 --- a/edi_core_oca/views/edi_backend_views.xml +++ b/edi_core_oca/views/edi_backend_views.xml @@ -57,7 +57,14 @@ - + + + + + + + + diff --git a/edi_core_oca/views/edi_exchange_record_views.xml b/edi_core_oca/views/edi_exchange_record_views.xml index f3538ea6e..326461558 100644 --- a/edi_core_oca/views/edi_exchange_record_views.xml +++ b/edi_core_oca/views/edi_exchange_record_views.xml @@ -265,6 +265,17 @@ help="Show all records created in the last 7 days" /> + + + From 7c32e062f70caec85367632235a83c6583036ea1 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Mon, 27 Apr 2026 14:36:06 +0000 Subject: [PATCH 044/145] [UPD] Update edi_core_oca.pot --- edi_core_oca/i18n/edi_core_oca.pot | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/edi_core_oca/i18n/edi_core_oca.pot b/edi_core_oca/i18n/edi_core_oca.pot index d599fe05b..436bf77b7 100644 --- a/edi_core_oca/i18n/edi_core_oca.pot +++ b/edi_core_oca/i18n/edi_core_oca.pot @@ -192,10 +192,12 @@ msgstr "" #: model:ir.model.fields,field_description:edi_core_oca.field_edi_backend__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration_trigger__active +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_record__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_type__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_type_rule__active #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_configuration_view_search +#: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_view_search msgid "Active" @@ -240,11 +242,17 @@ msgstr "" msgid "Apply to this model" msgstr "" +#. module: edi_core_oca +#: model:ir.actions.server,name:edi_core_oca.ir_cron_archive_old_edi_records_ir_actions_server +msgid "Archive Old EDI Exchange Records" +msgstr "" + #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_form #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_configuration_trigger_view_form #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_configuration_view_form +#: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_form #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_view_form @@ -264,6 +272,30 @@ msgid "" "will take care of generating the output when not set yet. " msgstr "" +#. module: edi_core_oca +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_backend__auto_archive_records_after_days +msgid "Auto-archive records after (days)" +msgstr "" + +#. module: edi_core_oca +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_backend__auto_delete_records_after_days +msgid "Auto-delete archived records after (days)" +msgstr "" + +#. module: edi_core_oca +#: model:ir.model.fields,help:edi_core_oca.field_edi_backend__auto_archive_records_after_days +msgid "" +"Automatically archive EDI exchange records after X days. Set to <= 0 to " +"disable auto-archiving." +msgstr "" + +#. module: edi_core_oca +#: model:ir.model.fields,help:edi_core_oca.field_edi_backend__auto_delete_records_after_days +msgid "" +"Automatically delete archived EDI exchange records after X days. Set to <= 0" +" to disable auto-deletion." +msgstr "" + #. module: edi_core_oca #: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration__backend_id #: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_record__backend_id @@ -416,6 +448,11 @@ msgstr "" msgid "Decoding Error Handler" msgstr "" +#. module: edi_core_oca +#: model:ir.actions.server,name:edi_core_oca.ir_cron_delete_old_archived_edi_records_ir_actions_server +msgid "Delete Old Archived EDI Exchange Records" +msgstr "" + #. module: edi_core_oca #: model:ir.model.fields,help:edi_core_oca.field_edi_configuration__description #: model:ir.model.fields,help:edi_core_oca.field_edi_configuration_trigger__description @@ -1364,6 +1401,11 @@ msgstr "" msgid "Record ID=%d is not meant to be sent!" msgstr "" +#. module: edi_core_oca +#: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_form +msgid "Records retention" +msgstr "" + #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_form msgid "Regenerate" From 732972baa22ec0946eacaaa0a1949f25ad831121 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Mon, 27 Apr 2026 14:36:07 +0000 Subject: [PATCH 045/145] [UPD] Update edi_oca.pot --- edi_oca/i18n/edi_oca.pot | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/edi_oca/i18n/edi_oca.pot b/edi_oca/i18n/edi_oca.pot index 4db84723b..f3babc523 100644 --- a/edi_oca/i18n/edi_oca.pot +++ b/edi_oca/i18n/edi_oca.pot @@ -168,10 +168,12 @@ msgstr "" #: model:ir.model.fields,field_description:edi_oca.field_edi_backend__active #: model:ir.model.fields,field_description:edi_oca.field_edi_configuration__active #: model:ir.model.fields,field_description:edi_oca.field_edi_configuration_trigger__active +#: model:ir.model.fields,field_description:edi_oca.field_edi_exchange_record__active #: model:ir.model.fields,field_description:edi_oca.field_edi_exchange_type__active #: model:ir.model.fields,field_description:edi_oca.field_edi_exchange_type_rule__active #: model_terms:ir.ui.view,arch_db:edi_oca.edi_backend_view_search #: model_terms:ir.ui.view,arch_db:edi_oca.edi_configuration_view_search +#: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_type_rule_view_search #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_type_view_search msgid "Active" @@ -210,11 +212,17 @@ msgstr "" msgid "Apply to this model" msgstr "" +#. module: edi_oca +#: model:ir.actions.server,name:edi_oca.ir_cron_archive_old_edi_records_ir_actions_server +msgid "Archive Old EDI Exchange Records" +msgstr "" + #. module: edi_oca #: model_terms:ir.ui.view,arch_db:edi_oca.edi_backend_view_form #: model_terms:ir.ui.view,arch_db:edi_oca.edi_backend_view_search #: model_terms:ir.ui.view,arch_db:edi_oca.edi_configuration_trigger_view_form #: model_terms:ir.ui.view,arch_db:edi_oca.edi_configuration_view_form +#: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_type_rule_view_form #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_type_rule_view_search #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_type_view_form @@ -234,6 +242,30 @@ msgid "" "will take care of generating the output when not set yet. " msgstr "" +#. module: edi_oca +#: model:ir.model.fields,field_description:edi_oca.field_edi_backend__auto_archive_records_after_days +msgid "Auto-archive records after (days)" +msgstr "" + +#. module: edi_oca +#: model:ir.model.fields,field_description:edi_oca.field_edi_backend__auto_delete_records_after_days +msgid "Auto-delete archived records after (days)" +msgstr "" + +#. module: edi_oca +#: model:ir.model.fields,help:edi_oca.field_edi_backend__auto_archive_records_after_days +msgid "" +"Automatically archive EDI exchange records after X days. Set to <= 0 to " +"disable auto-archiving." +msgstr "" + +#. module: edi_oca +#: model:ir.model.fields,help:edi_oca.field_edi_backend__auto_delete_records_after_days +msgid "" +"Automatically delete archived EDI exchange records after X days. Set to <= 0" +" to disable auto-deletion." +msgstr "" + #. module: edi_oca #: model:ir.model.fields,field_description:edi_oca.field_edi_configuration__backend_id #: model:ir.model.fields,field_description:edi_oca.field_edi_exchange_record__backend_id @@ -366,6 +398,11 @@ msgstr "" msgid "Decoding Error Handler" msgstr "" +#. module: edi_oca +#: model:ir.actions.server,name:edi_oca.ir_cron_delete_old_archived_edi_records_ir_actions_server +msgid "Delete Old Archived EDI Exchange Records" +msgstr "" + #. module: edi_oca #: model:ir.model.fields,help:edi_oca.field_edi_configuration__description #: model:ir.model.fields,help:edi_oca.field_edi_configuration_trigger__description @@ -1209,6 +1246,11 @@ msgstr "" msgid "Record" msgstr "" +#. module: edi_oca +#: model_terms:ir.ui.view,arch_db:edi_oca.edi_backend_view_form +msgid "Records retention" +msgstr "" + #. module: edi_oca #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_record_view_form msgid "Regenerate" From a82ba97316b22abe1c267ceb52e8e8c5ff3ad2ca Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 27 Apr 2026 14:42:43 +0000 Subject: [PATCH 046/145] [BOT] post-merge updates --- README.md | 2 +- edi_core_oca/README.rst | 30 +++------------------- edi_core_oca/__manifest__.py | 2 +- edi_core_oca/static/description/index.html | 2 +- 4 files changed, 6 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 35889a0be..4b9cfae86 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ addon | version | maintainers | summary [edi_account_core_oca](edi_account_core_oca/) | 18.0.1.1.1 | etobella | Define EDI Configuration for Account Moves [edi_account_oca](edi_account_oca/) | 18.0.1.1.1 | etobella | Define some component listeners for Account Moves [edi_component_oca](edi_component_oca/) | 18.0.1.0.3 | simahawk etobella | Allow to use Connector as a source in EDI -[edi_core_oca](edi_core_oca/) | 18.0.1.6.5 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. +[edi_core_oca](edi_core_oca/) | 18.0.1.6.6 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. [edi_endpoint_oca](edi_endpoint_oca/) | 18.0.1.0.3 | | Base module allowing configuration of custom endpoints for EDI framework. [edi_exchange_template_oca](edi_exchange_template_oca/) | 18.0.1.3.3 | simahawk | Allows definition of exchanges via templates. [edi_exchange_template_party_data](edi_exchange_template_party_data/) | 18.0.1.0.1 | simahawk | Glue module between edi_exchange_template and edi_party_data diff --git a/edi_core_oca/README.rst b/edi_core_oca/README.rst index d8ededb9b..bb985bd0d 100644 --- a/edi_core_oca/README.rst +++ b/edi_core_oca/README.rst @@ -6,12 +6,12 @@ EDI === -.. +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:97e3e3a909c79dced8fe9e6165a0c440f95f672e4a184a9b014cde518a5848c2 + !! source digest: sha256:c609033733302fa71a3c01c11e2729fd2b47ccde0b9a1d0619bed03cc26db4fe !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -64,30 +64,6 @@ In order to define a new Exchange Record, we need to configure: - Backend - Components -Exchange Records Retention ---------------------------- - -Configure automatic archiving and deletion of old exchange records per backend -to manage data retention and optimize performance. - -Go to an EDI Backend form and open the **Auto Cleanup** tab. Two fields are -available: - -- **Auto-archive records after (days)**: Archives exchange records older than - the specified number of days. Set to 0 to disable. - -- **Auto-delete archived records after (days)**: Permanently deletes archived - exchange records older than the specified number of days. Set to 0 to disable. - -Each backend can have different retention policies. Scheduled actions run -periodically to apply these settings: - -- Archive job runs daily -- Delete job runs every 3 hours - -To view archived records, use the "Archived" filter in the exchange records -search view. - Jobs ---- @@ -257,7 +233,7 @@ promote its widespread use. Current `maintainers `__: -|maintainer-simahawk| |maintainer-etobella| +|maintainer-simahawk| |maintainer-etobella| This module is part of the `OCA/edi-framework `_ project on GitHub. diff --git a/edi_core_oca/__manifest__.py b/edi_core_oca/__manifest__.py index fe3f5400a..a2929a7ab 100644 --- a/edi_core_oca/__manifest__.py +++ b/edi_core_oca/__manifest__.py @@ -9,7 +9,7 @@ Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. """, - "version": "18.0.1.6.5", + "version": "18.0.1.6.6", "website": "https://github.com/OCA/edi-framework", "development_status": "Beta", "license": "LGPL-3", diff --git a/edi_core_oca/static/description/index.html b/edi_core_oca/static/description/index.html index e7a67132d..0273741fe 100644 --- a/edi_core_oca/static/description/index.html +++ b/edi_core_oca/static/description/index.html @@ -372,7 +372,7 @@

    EDI

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:97e3e3a909c79dced8fe9e6165a0c440f95f672e4a184a9b014cde518a5848c2 +!! source digest: sha256:c609033733302fa71a3c01c11e2729fd2b47ccde0b9a1d0619bed03cc26db4fe !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

    Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

    Base EDI backend.

    From eaf47116934d5301ec0baa1e7796c645762933bf Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 27 Apr 2026 14:42:52 +0000 Subject: [PATCH 047/145] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: edi-framework-18.0/edi-framework-18.0-edi_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_oca/ --- edi_oca/i18n/it.po | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/edi_oca/i18n/it.po b/edi_oca/i18n/it.po index cbff8fe7c..b7c6df9cf 100644 --- a/edi_oca/i18n/it.po +++ b/edi_oca/i18n/it.po @@ -234,10 +234,12 @@ msgstr "Azione richiesta" #: model:ir.model.fields,field_description:edi_oca.field_edi_backend__active #: model:ir.model.fields,field_description:edi_oca.field_edi_configuration__active #: model:ir.model.fields,field_description:edi_oca.field_edi_configuration_trigger__active +#: model:ir.model.fields,field_description:edi_oca.field_edi_exchange_record__active #: model:ir.model.fields,field_description:edi_oca.field_edi_exchange_type__active #: model:ir.model.fields,field_description:edi_oca.field_edi_exchange_type_rule__active #: model_terms:ir.ui.view,arch_db:edi_oca.edi_backend_view_search #: model_terms:ir.ui.view,arch_db:edi_oca.edi_configuration_view_search +#: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_type_rule_view_search #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_type_view_search msgid "Active" @@ -276,11 +278,17 @@ msgstr "Consentire file vuoti" msgid "Apply to this model" msgstr "Applica a questo modello" +#. module: edi_oca +#: model:ir.actions.server,name:edi_oca.ir_cron_archive_old_edi_records_ir_actions_server +msgid "Archive Old EDI Exchange Records" +msgstr "" + #. module: edi_oca #: model_terms:ir.ui.view,arch_db:edi_oca.edi_backend_view_form #: model_terms:ir.ui.view,arch_db:edi_oca.edi_backend_view_search #: model_terms:ir.ui.view,arch_db:edi_oca.edi_configuration_trigger_view_form #: model_terms:ir.ui.view,arch_db:edi_oca.edi_configuration_view_form +#: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_type_rule_view_form #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_type_rule_view_search #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_type_view_form @@ -303,6 +311,30 @@ msgstr "" "contenuto. Se attiva, un cron gestirà la generazione dell'output quando non " "ancora impostato. " +#. module: edi_oca +#: model:ir.model.fields,field_description:edi_oca.field_edi_backend__auto_archive_records_after_days +msgid "Auto-archive records after (days)" +msgstr "" + +#. module: edi_oca +#: model:ir.model.fields,field_description:edi_oca.field_edi_backend__auto_delete_records_after_days +msgid "Auto-delete archived records after (days)" +msgstr "" + +#. module: edi_oca +#: model:ir.model.fields,help:edi_oca.field_edi_backend__auto_archive_records_after_days +msgid "" +"Automatically archive EDI exchange records after X days. Set to <= 0 to " +"disable auto-archiving." +msgstr "" + +#. module: edi_oca +#: model:ir.model.fields,help:edi_oca.field_edi_backend__auto_delete_records_after_days +msgid "" +"Automatically delete archived EDI exchange records after X days. Set to <= 0 " +"to disable auto-deletion." +msgstr "" + #. module: edi_oca #: model:ir.model.fields,field_description:edi_oca.field_edi_configuration__backend_id #: model:ir.model.fields,field_description:edi_oca.field_edi_exchange_record__backend_id @@ -435,6 +467,11 @@ msgstr "Personalizzato" msgid "Decoding Error Handler" msgstr "Gestore errore decodifica" +#. module: edi_oca +#: model:ir.actions.server,name:edi_oca.ir_cron_delete_old_archived_edi_records_ir_actions_server +msgid "Delete Old Archived EDI Exchange Records" +msgstr "" + #. module: edi_oca #: model:ir.model.fields,help:edi_oca.field_edi_configuration__description #: model:ir.model.fields,help:edi_oca.field_edi_configuration_trigger__description @@ -1304,6 +1341,11 @@ msgstr "Scambi recenti" msgid "Record" msgstr "Record" +#. module: edi_oca +#: model_terms:ir.ui.view,arch_db:edi_oca.edi_backend_view_form +msgid "Records retention" +msgstr "" + #. module: edi_oca #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_record_view_form msgid "Regenerate" From 6d946900ed1d226cb463e4b2417e67f48b32cc70 Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 27 Apr 2026 14:42:52 +0000 Subject: [PATCH 048/145] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: edi-framework-18.0/edi-framework-18.0-edi_core_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_core_oca/ --- edi_core_oca/i18n/es.po | 42 +++++++++++++++++++++++++++++++++++++++++ edi_core_oca/i18n/fr.po | 42 +++++++++++++++++++++++++++++++++++++++++ edi_core_oca/i18n/it.po | 42 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+) diff --git a/edi_core_oca/i18n/es.po b/edi_core_oca/i18n/es.po index 3fecfe8e6..6aa91ccbc 100644 --- a/edi_core_oca/i18n/es.po +++ b/edi_core_oca/i18n/es.po @@ -196,10 +196,12 @@ msgstr "" #: model:ir.model.fields,field_description:edi_core_oca.field_edi_backend__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration_trigger__active +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_record__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_type__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_type_rule__active #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_configuration_view_search +#: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_view_search msgid "Active" @@ -244,11 +246,17 @@ msgstr "" msgid "Apply to this model" msgstr "" +#. module: edi_core_oca +#: model:ir.actions.server,name:edi_core_oca.ir_cron_archive_old_edi_records_ir_actions_server +msgid "Archive Old EDI Exchange Records" +msgstr "" + #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_form #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_configuration_trigger_view_form #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_configuration_view_form +#: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_form #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_view_form @@ -268,6 +276,30 @@ msgid "" "will take care of generating the output when not set yet. " msgstr "" +#. module: edi_core_oca +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_backend__auto_archive_records_after_days +msgid "Auto-archive records after (days)" +msgstr "" + +#. module: edi_core_oca +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_backend__auto_delete_records_after_days +msgid "Auto-delete archived records after (days)" +msgstr "" + +#. module: edi_core_oca +#: model:ir.model.fields,help:edi_core_oca.field_edi_backend__auto_archive_records_after_days +msgid "" +"Automatically archive EDI exchange records after X days. Set to <= 0 to " +"disable auto-archiving." +msgstr "" + +#. module: edi_core_oca +#: model:ir.model.fields,help:edi_core_oca.field_edi_backend__auto_delete_records_after_days +msgid "" +"Automatically delete archived EDI exchange records after X days. Set to <= 0 " +"to disable auto-deletion." +msgstr "" + #. module: edi_core_oca #: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration__backend_id #: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_record__backend_id @@ -420,6 +452,11 @@ msgstr "" msgid "Decoding Error Handler" msgstr "" +#. module: edi_core_oca +#: model:ir.actions.server,name:edi_core_oca.ir_cron_delete_old_archived_edi_records_ir_actions_server +msgid "Delete Old Archived EDI Exchange Records" +msgstr "" + #. module: edi_core_oca #: model:ir.model.fields,help:edi_core_oca.field_edi_configuration__description #: model:ir.model.fields,help:edi_core_oca.field_edi_configuration_trigger__description @@ -1373,6 +1410,11 @@ msgstr "" msgid "Record ID=%d is not meant to be sent!" msgstr "" +#. module: edi_core_oca +#: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_form +msgid "Records retention" +msgstr "" + #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_form msgid "Regenerate" diff --git a/edi_core_oca/i18n/fr.po b/edi_core_oca/i18n/fr.po index dc7d2a607..28a967be4 100644 --- a/edi_core_oca/i18n/fr.po +++ b/edi_core_oca/i18n/fr.po @@ -201,10 +201,12 @@ msgstr "" #: model:ir.model.fields,field_description:edi_core_oca.field_edi_backend__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration_trigger__active +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_record__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_type__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_type_rule__active #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_configuration_view_search +#: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_view_search msgid "Active" @@ -251,11 +253,17 @@ msgstr "" msgid "Apply to this model" msgstr "" +#. module: edi_core_oca +#: model:ir.actions.server,name:edi_core_oca.ir_cron_archive_old_edi_records_ir_actions_server +msgid "Archive Old EDI Exchange Records" +msgstr "" + #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_form #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_configuration_trigger_view_form #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_configuration_view_form +#: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_form #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_view_form @@ -278,6 +286,30 @@ msgstr "" "utile est manquante. Si cette option est active, un cron se chargera de " "générer la sortie lorsqu'elle n'est pas encore définie. " +#. module: edi_core_oca +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_backend__auto_archive_records_after_days +msgid "Auto-archive records after (days)" +msgstr "" + +#. module: edi_core_oca +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_backend__auto_delete_records_after_days +msgid "Auto-delete archived records after (days)" +msgstr "" + +#. module: edi_core_oca +#: model:ir.model.fields,help:edi_core_oca.field_edi_backend__auto_archive_records_after_days +msgid "" +"Automatically archive EDI exchange records after X days. Set to <= 0 to " +"disable auto-archiving." +msgstr "" + +#. module: edi_core_oca +#: model:ir.model.fields,help:edi_core_oca.field_edi_backend__auto_delete_records_after_days +msgid "" +"Automatically delete archived EDI exchange records after X days. Set to <= 0 " +"to disable auto-deletion." +msgstr "" + #. module: edi_core_oca #: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration__backend_id #: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_record__backend_id @@ -430,6 +462,11 @@ msgstr "" msgid "Decoding Error Handler" msgstr "" +#. module: edi_core_oca +#: model:ir.actions.server,name:edi_core_oca.ir_cron_delete_old_archived_edi_records_ir_actions_server +msgid "Delete Old Archived EDI Exchange Records" +msgstr "" + #. module: edi_core_oca #: model:ir.model.fields,help:edi_core_oca.field_edi_configuration__description #: model:ir.model.fields,help:edi_core_oca.field_edi_configuration_trigger__description @@ -1391,6 +1428,11 @@ msgstr "" msgid "Record ID=%d is not meant to be sent!" msgstr "" +#. module: edi_core_oca +#: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_form +msgid "Records retention" +msgstr "" + #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_form msgid "Regenerate" diff --git a/edi_core_oca/i18n/it.po b/edi_core_oca/i18n/it.po index 68ed9f741..550bf58dc 100644 --- a/edi_core_oca/i18n/it.po +++ b/edi_core_oca/i18n/it.po @@ -259,10 +259,12 @@ msgstr "Riemesso ACK: stato riportato a '%s'" #: model:ir.model.fields,field_description:edi_core_oca.field_edi_backend__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration_trigger__active +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_record__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_type__active #: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_type_rule__active #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_configuration_view_search +#: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_view_search msgid "Active" @@ -309,11 +311,17 @@ msgstr "" msgid "Apply to this model" msgstr "Applica a questo modello" +#. module: edi_core_oca +#: model:ir.actions.server,name:edi_core_oca.ir_cron_archive_old_edi_records_ir_actions_server +msgid "Archive Old EDI Exchange Records" +msgstr "" + #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_form #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_configuration_trigger_view_form #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_configuration_view_form +#: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_form #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_view_form @@ -336,6 +344,30 @@ msgstr "" "contenuto. Se attiva, un cron gestirà la generazione dell'output quando non " "ancora impostato. " +#. module: edi_core_oca +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_backend__auto_archive_records_after_days +msgid "Auto-archive records after (days)" +msgstr "" + +#. module: edi_core_oca +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_backend__auto_delete_records_after_days +msgid "Auto-delete archived records after (days)" +msgstr "" + +#. module: edi_core_oca +#: model:ir.model.fields,help:edi_core_oca.field_edi_backend__auto_archive_records_after_days +msgid "" +"Automatically archive EDI exchange records after X days. Set to <= 0 to " +"disable auto-archiving." +msgstr "" + +#. module: edi_core_oca +#: model:ir.model.fields,help:edi_core_oca.field_edi_backend__auto_delete_records_after_days +msgid "" +"Automatically delete archived EDI exchange records after X days. Set to <= 0 " +"to disable auto-deletion." +msgstr "" + #. module: edi_core_oca #: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration__backend_id #: model:ir.model.fields,field_description:edi_core_oca.field_edi_exchange_record__backend_id @@ -488,6 +520,11 @@ msgstr "Personalizzato" msgid "Decoding Error Handler" msgstr "Gestore errore decodifica" +#. module: edi_core_oca +#: model:ir.actions.server,name:edi_core_oca.ir_cron_delete_old_archived_edi_records_ir_actions_server +msgid "Delete Old Archived EDI Exchange Records" +msgstr "" + #. module: edi_core_oca #: model:ir.model.fields,help:edi_core_oca.field_edi_configuration__description #: model:ir.model.fields,help:edi_core_oca.field_edi_configuration_trigger__description @@ -1465,6 +1502,11 @@ msgstr "Record ID=%d non è previsto che sia elaborato" msgid "Record ID=%d is not meant to be sent!" msgstr "Record ID=%d non è previsto che sia inviato!" +#. module: edi_core_oca +#: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_form +msgid "Records retention" +msgstr "" + #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_form msgid "Regenerate" From 77cfa06c5a12b13380668e70a450e7aea339a51e Mon Sep 17 00:00:00 2001 From: mymage Date: Thu, 30 Apr 2026 08:36:43 +0000 Subject: [PATCH 049/145] Translated using Weblate (Italian) Currently translated at 100.0% (258 of 258 strings) Translation: edi-framework-18.0/edi-framework-18.0-edi_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_oca/it/ --- edi_oca/i18n/it.po | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/edi_oca/i18n/it.po b/edi_oca/i18n/it.po index b7c6df9cf..33faed5c2 100644 --- a/edi_oca/i18n/it.po +++ b/edi_oca/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2026-02-10 15:09+0000\n" +"PO-Revision-Date: 2026-04-30 10:45+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -281,7 +281,7 @@ msgstr "Applica a questo modello" #. module: edi_oca #: model:ir.actions.server,name:edi_oca.ir_cron_archive_old_edi_records_ir_actions_server msgid "Archive Old EDI Exchange Records" -msgstr "" +msgstr "Archivia i vecchi record EDI" #. module: edi_oca #: model_terms:ir.ui.view,arch_db:edi_oca.edi_backend_view_form @@ -314,12 +314,12 @@ msgstr "" #. module: edi_oca #: model:ir.model.fields,field_description:edi_oca.field_edi_backend__auto_archive_records_after_days msgid "Auto-archive records after (days)" -msgstr "" +msgstr "Auto archivia i record dopo (giorni)" #. module: edi_oca #: model:ir.model.fields,field_description:edi_oca.field_edi_backend__auto_delete_records_after_days msgid "Auto-delete archived records after (days)" -msgstr "" +msgstr "Auto cancella i record archiviati dopo (giorni)" #. module: edi_oca #: model:ir.model.fields,help:edi_oca.field_edi_backend__auto_archive_records_after_days @@ -327,6 +327,8 @@ msgid "" "Automatically archive EDI exchange records after X days. Set to <= 0 to " "disable auto-archiving." msgstr "" +"Archivia automaticamente i record di scambio EDI dopo X giorni. Impostare " +"inferiore o uguale a 0 per disabilitare l'auto archiviazione." #. module: edi_oca #: model:ir.model.fields,help:edi_oca.field_edi_backend__auto_delete_records_after_days @@ -334,6 +336,8 @@ msgid "" "Automatically delete archived EDI exchange records after X days. Set to <= 0 " "to disable auto-deletion." msgstr "" +"Cancella automaticamente i record di scambio EDI archiviati dopo X giorni. " +"Impostare inferiore o uguale a 0 per disabilitare l'auto cancellazione." #. module: edi_oca #: model:ir.model.fields,field_description:edi_oca.field_edi_configuration__backend_id @@ -470,7 +474,7 @@ msgstr "Gestore errore decodifica" #. module: edi_oca #: model:ir.actions.server,name:edi_oca.ir_cron_delete_old_archived_edi_records_ir_actions_server msgid "Delete Old Archived EDI Exchange Records" -msgstr "" +msgstr "Cancella i vecchi record di scambio EDI archiviati" #. module: edi_oca #: model:ir.model.fields,help:edi_oca.field_edi_configuration__description @@ -1344,7 +1348,7 @@ msgstr "Record" #. module: edi_oca #: model_terms:ir.ui.view,arch_db:edi_oca.edi_backend_view_form msgid "Records retention" -msgstr "" +msgstr "Cancellazione record" #. module: edi_oca #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_record_view_form From 26b5d071e09ec216fae3f21ce33fcb831627a73f Mon Sep 17 00:00:00 2001 From: mymage Date: Thu, 30 Apr 2026 08:36:16 +0000 Subject: [PATCH 050/145] Translated using Weblate (Italian) Currently translated at 100.0% (283 of 283 strings) Translation: edi-framework-18.0/edi-framework-18.0-edi_core_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_core_oca/it/ --- edi_core_oca/i18n/it.po | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/edi_core_oca/i18n/it.po b/edi_core_oca/i18n/it.po index 550bf58dc..14ad64c81 100644 --- a/edi_core_oca/i18n/it.po +++ b/edi_core_oca/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 17.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2026-02-10 15:09+0000\n" +"PO-Revision-Date: 2026-04-30 10:45+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -314,7 +314,7 @@ msgstr "Applica a questo modello" #. module: edi_core_oca #: model:ir.actions.server,name:edi_core_oca.ir_cron_archive_old_edi_records_ir_actions_server msgid "Archive Old EDI Exchange Records" -msgstr "" +msgstr "Archivia i vecchi record EDI" #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_form @@ -347,12 +347,12 @@ msgstr "" #. module: edi_core_oca #: model:ir.model.fields,field_description:edi_core_oca.field_edi_backend__auto_archive_records_after_days msgid "Auto-archive records after (days)" -msgstr "" +msgstr "Auto archivia i record dopo (giorni)" #. module: edi_core_oca #: model:ir.model.fields,field_description:edi_core_oca.field_edi_backend__auto_delete_records_after_days msgid "Auto-delete archived records after (days)" -msgstr "" +msgstr "Auto cancella i record archiviati dopo (giorni)" #. module: edi_core_oca #: model:ir.model.fields,help:edi_core_oca.field_edi_backend__auto_archive_records_after_days @@ -360,6 +360,8 @@ msgid "" "Automatically archive EDI exchange records after X days. Set to <= 0 to " "disable auto-archiving." msgstr "" +"Archivia automaticamente i record di scambio EDI dopo X giorni. Impostare " +"inferiore o uguale a 0 per disabilitare l'auto archiviazione." #. module: edi_core_oca #: model:ir.model.fields,help:edi_core_oca.field_edi_backend__auto_delete_records_after_days @@ -367,6 +369,8 @@ msgid "" "Automatically delete archived EDI exchange records after X days. Set to <= 0 " "to disable auto-deletion." msgstr "" +"Cancella automaticamente i record di scambio EDI archiviati dopo X giorni. " +"Impostare inferiore o uguale a 0 per disabilitare l'auto cancellazione." #. module: edi_core_oca #: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration__backend_id @@ -523,7 +527,7 @@ msgstr "Gestore errore decodifica" #. module: edi_core_oca #: model:ir.actions.server,name:edi_core_oca.ir_cron_delete_old_archived_edi_records_ir_actions_server msgid "Delete Old Archived EDI Exchange Records" -msgstr "" +msgstr "Cancella i vecchi record di scambio EDI archiviati" #. module: edi_core_oca #: model:ir.model.fields,help:edi_core_oca.field_edi_configuration__description @@ -1505,7 +1509,7 @@ msgstr "Record ID=%d non è previsto che sia inviato!" #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_backend_view_form msgid "Records retention" -msgstr "" +msgstr "Cancellazione record" #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_form From 6b4355ae166bd2ace76326ffa92bfb307d01d96c Mon Sep 17 00:00:00 2001 From: oca-ci Date: Wed, 6 May 2026 08:49:27 +0000 Subject: [PATCH 051/145] [UPD] Update edi_notification_oca.pot --- edi_notification_oca/i18n/edi_notification_oca.pot | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/edi_notification_oca/i18n/edi_notification_oca.pot b/edi_notification_oca/i18n/edi_notification_oca.pot index 43162d14e..f31e62e4a 100644 --- a/edi_notification_oca/i18n/edi_notification_oca.pot +++ b/edi_notification_oca/i18n/edi_notification_oca.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" +"Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -56,7 +56,6 @@ msgstr "" #. module: edi_notification_oca #. odoo-python #: code:addons/edi_notification_oca/components/listener.py:0 -#, python-format msgid "EDI: Process error on record '%(identifier)s'." msgstr "" From d88e6f34f18b39e7032a73505c1b7cf25b6bb779 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 6 May 2026 08:56:16 +0000 Subject: [PATCH 052/145] [BOT] post-merge updates --- README.md | 1 + edi_notification_oca/README.rst | 26 +++++++++------- .../static/description/index.html | 30 +++++++++++-------- setup/_metapackage/pyproject.toml | 3 +- 4 files changed, 36 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 4b9cfae86..7b91f650b 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ addon | version | maintainers | summary [edi_endpoint_oca](edi_endpoint_oca/) | 18.0.1.0.3 | | Base module allowing configuration of custom endpoints for EDI framework. [edi_exchange_template_oca](edi_exchange_template_oca/) | 18.0.1.3.3 | simahawk | Allows definition of exchanges via templates. [edi_exchange_template_party_data](edi_exchange_template_party_data/) | 18.0.1.0.1 | simahawk | Glue module between edi_exchange_template and edi_party_data +[edi_notification_oca](edi_notification_oca/) | 18.0.1.0.0 | | Define notification activities on exchange records. [edi_oca](edi_oca/) | 18.0.1.5.2 | simahawk etobella | Integrate all EDI modules together [edi_party_data_oca](edi_party_data_oca/) | 18.0.1.0.1 | simahawk | Allow to configure and retrieve party information for EDI exchanges. [edi_queue_oca](edi_queue_oca/) | 18.0.1.0.2 | | Set Queue Jobs on EDI diff --git a/edi_notification_oca/README.rst b/edi_notification_oca/README.rst index 79b243d20..3c08c4141 100644 --- a/edi_notification_oca/README.rst +++ b/edi_notification_oca/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ================ EDI Notification ================ @@ -7,13 +11,13 @@ EDI Notification !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:d8651cf2a0e90d542e65ce8083a2bccffd0b1a3549867bb7a8e91843bd62a770 + !! source digest: sha256:d865a9ca8287a26c0e9185d73c56951401b600d75381622a3f3474f5ee2c0992 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png :target: https://odoo-community.org/page/development-status :alt: Alpha -.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi--framework-lightgray.png?logo=github @@ -33,13 +37,13 @@ process fails. Exchange types must be configured properly to create such activities: -- field "Notify On Process Error" must be checked to activate the - feature for the current exchange type -- field "Activity Type Used When Notify On Process Error" is used to - define the type of the newly created activity -- fields "Notify Groups On Process Error" and "Notify Users On Process - Error" are used to define the users that will be assigned to the - newly created activity +- field "Notify On Process Error" must be checked to activate the + feature for the current exchange type +- field "Activity Type Used When Notify On Process Error" is used to + define the type of the newly created activity +- fields "Notify Groups On Process Error" and "Notify Users On Process + Error" are used to define the users that will be assigned to the newly + created activity .. IMPORTANT:: This is an alpha version, the data model and design can change at any time without warning. @@ -72,8 +76,8 @@ Authors Contributors ------------ -- Duong (Tran Quoc) -- Simone Orsi +- Duong (Tran Quoc) +- Simone Orsi Maintainers ----------- diff --git a/edi_notification_oca/static/description/index.html b/edi_notification_oca/static/description/index.html index 0120c593b..cbf2538dc 100644 --- a/edi_notification_oca/static/description/index.html +++ b/edi_notification_oca/static/description/index.html @@ -3,7 +3,7 @@ -EDI Notification +README.rst -
    -

    EDI Notification

    +
    + + +Odoo Community Association + +
    +

    EDI Notification

    -

    Alpha License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

    +

    Alpha License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

    This module creates activities for users when an exchange record’s process fails.

    Exchange types must be configured properly to create such activities:

    @@ -379,8 +384,8 @@

    EDI Notification

  • field “Activity Type Used When Notify On Process Error” is used to define the type of the newly created activity
  • fields “Notify Groups On Process Error” and “Notify Users On Process -Error” are used to define the users that will be assigned to the -newly created activity
  • +Error” are used to define the users that will be assigned to the newly +created activity

    Important

    @@ -401,7 +406,7 @@

    EDI Notification

    -

    Bug Tracker

    +

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -409,22 +414,22 @@

    Bug Tracker

    Do not contact contributors directly about support or help with technical issues.

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • Camptocamp
    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association @@ -437,5 +442,6 @@

    Maintainers

    +
    diff --git a/setup/_metapackage/pyproject.toml b/setup/_metapackage/pyproject.toml index ef3979096..9e80670a9 100644 --- a/setup/_metapackage/pyproject.toml +++ b/setup/_metapackage/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "odoo-addons-oca-edi-framework" -version = "18.0.20251201.0" +version = "18.0.20260506.0" dependencies = [ "odoo-addon-edi_account_core_oca==18.0.*", "odoo-addon-edi_account_oca==18.0.*", @@ -9,6 +9,7 @@ dependencies = [ "odoo-addon-edi_endpoint_oca==18.0.*", "odoo-addon-edi_exchange_template_oca==18.0.*", "odoo-addon-edi_exchange_template_party_data==18.0.*", + "odoo-addon-edi_notification_oca==18.0.*", "odoo-addon-edi_oca==18.0.*", "odoo-addon-edi_party_data_oca==18.0.*", "odoo-addon-edi_queue_oca==18.0.*", From 2ef4db3e04925b40251c3aa4265b1b68117d8056 Mon Sep 17 00:00:00 2001 From: Arnau Date: Tue, 12 May 2026 14:19:38 +0200 Subject: [PATCH 053/145] [FIX] edi_storage_oca: raise error if file is missing when performing receive --- .../models/edi_oca_storage_handler.py | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/edi_storage_oca/models/edi_oca_storage_handler.py b/edi_storage_oca/models/edi_oca_storage_handler.py index ce0f7682f..3e2a3d938 100644 --- a/edi_storage_oca/models/edi_oca_storage_handler.py +++ b/edi_storage_oca/models/edi_oca_storage_handler.py @@ -9,6 +9,7 @@ from pathlib import PurePath from odoo import models +from odoo.exceptions import UserError from .. import utils @@ -34,7 +35,9 @@ def send(self, exchange_record): utils.add_file(exchange_record.backend_id.storage_id, path.as_posix(), filedata) def receive(self, exchange_record): - return self._get_remote_file(exchange_record, "pending", binary=True) + return self._get_remote_file( + exchange_record, "pending", binary=True, raise_if_missing=True + ) def _dir_by_state(self, backend, direction, state): """Return remote directory path by direction and state. @@ -61,11 +64,21 @@ def _get_remote_file_path(self, exchange_record, state, filename=None): ) return path - def _get_remote_file(self, exchange_record, state, filename=None, binary=False): + def _get_remote_file( + self, + exchange_record, + state, + filename=None, + binary=False, + raise_if_missing=False, + ): """Get file for current exchange_record in the given destination state. :param state: string ("pending", "done", "error") :param filename: custom file name, exchange_record filename used by default + :param raise_if_missing: when True, storage errors are re-raised as + swallable exceptions so the caller transitions the record to an + error state instead of treating "no content" as a successful read. :return: remote file content as string """ path = self._get_remote_file_path(exchange_record, state, filename=filename) @@ -84,14 +97,25 @@ def _get_remote_file(self, exchange_record, state, filename=None, binary=False): path, state, ) + if raise_if_missing: + raise return None - except OSError: - _logger.info( - "Ignored OSError when trying to get file %s into path %s for state %s", + except OSError as err: + _logger.warning( + "OSError when trying to get file %s into path %s for state %s: %s", filename, path, state, + err, ) + if raise_if_missing: + raise UserError( + self.env._( + "Storage error while reading %(path)s: %(error)s", + path=path.as_posix(), + error=str(err), + ) + ) from err return None def check(self, exchange_record): From 893a853674ddad8534792b1970d5e4260f80ecab Mon Sep 17 00:00:00 2001 From: oca-ci Date: Thu, 14 May 2026 09:53:07 +0000 Subject: [PATCH 054/145] [UPD] Update edi_product_oca.pot --- edi_product_oca/i18n/edi_product_oca.pot | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/edi_product_oca/i18n/edi_product_oca.pot b/edi_product_oca/i18n/edi_product_oca.pot index d9357cef8..d1e8fd111 100644 --- a/edi_product_oca/i18n/edi_product_oca.pot +++ b/edi_product_oca/i18n/edi_product_oca.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" +"Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -104,6 +104,13 @@ msgstr "" msgid "Product Variant" msgstr "" +#. module: edi_product_oca +#: model:ir.model.fields,help:edi_product_oca.field_product_packaging__origin_edi_endpoint_id +#: model:ir.model.fields,help:edi_product_oca.field_product_product__origin_edi_endpoint_id +#: model:ir.model.fields,help:edi_product_oca.field_product_template__origin_edi_endpoint_id +msgid "Record generated via this endpoint" +msgstr "" + #. module: edi_product_oca #: model:ir.model.fields,help:edi_product_oca.field_product_packaging__edi_disable_auto #: model:ir.model.fields,help:edi_product_oca.field_product_product__edi_disable_auto From 14a7d4e405284763c4a9e54a3db26e869fe42d94 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 14 May 2026 09:59:44 +0000 Subject: [PATCH 055/145] [BOT] post-merge updates --- README.md | 1 + edi_product_oca/README.rst | 8 ++++-- edi_product_oca/static/description/index.html | 26 ++++++++++++------- setup/_metapackage/pyproject.toml | 3 ++- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 7b91f650b..aecae8c89 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ addon | version | maintainers | summary [edi_notification_oca](edi_notification_oca/) | 18.0.1.0.0 | | Define notification activities on exchange records. [edi_oca](edi_oca/) | 18.0.1.5.2 | simahawk etobella | Integrate all EDI modules together [edi_party_data_oca](edi_party_data_oca/) | 18.0.1.0.1 | simahawk | Allow to configure and retrieve party information for EDI exchanges. +[edi_product_oca](edi_product_oca/) | 18.0.1.0.0 | | EDI framework configuration and base logic for products and products packaging [edi_queue_oca](edi_queue_oca/) | 18.0.1.0.2 | | Set Queue Jobs on EDI [edi_record_metadata_oca](edi_record_metadata_oca/) | 18.0.1.0.4 | simahawk | Allow to store metadata for related records. [edi_sale_endpoint](edi_sale_endpoint/) | 18.0.1.0.0 | simahawk | Glue module between edi_sale_oca and edi_endpoint_oca. diff --git a/edi_product_oca/README.rst b/edi_product_oca/README.rst index 5950ca415..2d11a2c73 100644 --- a/edi_product_oca/README.rst +++ b/edi_product_oca/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + =========== EDI Product =========== @@ -7,13 +11,13 @@ EDI Product !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:8f49d35294d2a460c2a760795e6ae4db9f0b69301fe18c483bf7bc0c1177d5b1 + !! source digest: sha256:a5d2a242159e8137d9d6b6f8e2a694c0ffe6721d91b3759ddf20bdef54ad0eb6 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi--framework-lightgray.png?logo=github diff --git a/edi_product_oca/static/description/index.html b/edi_product_oca/static/description/index.html index 6e95ec654..280bab5c4 100644 --- a/edi_product_oca/static/description/index.html +++ b/edi_product_oca/static/description/index.html @@ -3,7 +3,7 @@ -EDI Product +README.rst -
    -

    EDI Product

    +
    + + +Odoo Community Association + +
    +

    EDI Product

    -

    Beta License: AGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

    +

    Beta License: AGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

    Provide basic configuration for products and product packaging with EDI framework.

    Table of contents

    @@ -385,7 +390,7 @@

    EDI Product

    -

    Bug Tracker

    +

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -393,22 +398,22 @@

    Bug Tracker

    Do not contact contributors directly about support or help with technical issues.

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • ForgeFlow
    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association @@ -421,5 +426,6 @@

    Maintainers

    +
    diff --git a/setup/_metapackage/pyproject.toml b/setup/_metapackage/pyproject.toml index 9e80670a9..988bd3ff5 100644 --- a/setup/_metapackage/pyproject.toml +++ b/setup/_metapackage/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "odoo-addons-oca-edi-framework" -version = "18.0.20260506.0" +version = "18.0.20260514.0" dependencies = [ "odoo-addon-edi_account_core_oca==18.0.*", "odoo-addon-edi_account_oca==18.0.*", @@ -12,6 +12,7 @@ dependencies = [ "odoo-addon-edi_notification_oca==18.0.*", "odoo-addon-edi_oca==18.0.*", "odoo-addon-edi_party_data_oca==18.0.*", + "odoo-addon-edi_product_oca==18.0.*", "odoo-addon-edi_queue_oca==18.0.*", "odoo-addon-edi_record_metadata_oca==18.0.*", "odoo-addon-edi_sale_endpoint==18.0.*", From 581be1c4b3355c3ced86d6d28d64f5b41cb61f1e Mon Sep 17 00:00:00 2001 From: Arnau Date: Thu, 12 Mar 2026 11:18:28 +0100 Subject: [PATCH 056/145] [REF] edi_core: move back ``_trigger_edi_event_make_name`` to core --- edi_component_oca/models/edi_exchange_record.py | 6 ------ edi_core_oca/models/edi_exchange_record.py | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/edi_component_oca/models/edi_exchange_record.py b/edi_component_oca/models/edi_exchange_record.py index 551d1fa6b..c37c17f93 100644 --- a/edi_component_oca/models/edi_exchange_record.py +++ b/edi_component_oca/models/edi_exchange_record.py @@ -8,12 +8,6 @@ class EdiExchangeRecord(models.Model): _inherit = "edi.exchange.record" - def _trigger_edi_event_make_name(self, name, suffix=None): - return "on_edi_exchange_{name}{suffix}".format( - name=name, - suffix=("_" + suffix) if suffix else "", - ) - def _trigger_edi_event(self, name, suffix=None, target=None, **kw): """Trigger a component event linked to this backend and edi exchange.""" name = self._trigger_edi_event_make_name(name, suffix=suffix) diff --git a/edi_core_oca/models/edi_exchange_record.py b/edi_core_oca/models/edi_exchange_record.py index a87b4506e..4cc9d86b7 100644 --- a/edi_core_oca/models/edi_exchange_record.py +++ b/edi_core_oca/models/edi_exchange_record.py @@ -536,6 +536,12 @@ def _trigger_edi_event(self, name, suffix=None, target=None, **kw): """Hook to be implemented in other modules""" pass + def _trigger_edi_event_make_name(self, name, suffix=None): + return "on_edi_exchange_{name}{suffix}".format( + name=name, + suffix=("_" + suffix) if suffix else "", + ) + def _notify_done(self): self._notify_related_record(self._exchange_status_message("process_ok")) self._trigger_edi_event("done") From f91e4244b7c7d0000c7552f2b658fec72a0da4b3 Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Thu, 14 May 2026 10:40:56 +0200 Subject: [PATCH 057/145] [IMP[ edi_core: add option for global edi.configuration Global configurations can be used to catch generic events not bound to specific partner releations. As such, they are the core framework replacement for component events. Co-authored-by: Arnau --- edi_core_oca/models/edi_configuration.py | 7 +++++++ edi_core_oca/views/edi_configuration_views.xml | 1 + 2 files changed, 8 insertions(+) diff --git a/edi_core_oca/models/edi_configuration.py b/edi_core_oca/models/edi_configuration.py index 93d7412f3..795d141ce 100644 --- a/edi_core_oca/models/edi_configuration.py +++ b/edi_core_oca/models/edi_configuration.py @@ -67,6 +67,13 @@ class EdiConfiguration(models.Model): help="""Used to do something specific here. Receives: operation, edi_action, vals, old_vals.""", ) + # You can use this to avoid component events ;) + is_global = fields.Boolean( + string="Global Configuration", + help="If checked, this configuration will be executed for all records, " + "regardless of the partner relation.", + default=False, + ) @api.constrains("backend_id", "type_id") def _constrains_backend(self): diff --git a/edi_core_oca/views/edi_configuration_views.xml b/edi_core_oca/views/edi_configuration_views.xml index 053db7764..674e88f8b 100644 --- a/edi_core_oca/views/edi_configuration_views.xml +++ b/edi_core_oca/views/edi_configuration_views.xml @@ -74,6 +74,7 @@ name="model_id" options="{'no_create': True, 'no_create_edit': True}" /> + From 4d28237b9b753034c27ef4aedf33eef68d3d3301 Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Thu, 14 May 2026 11:02:55 +0200 Subject: [PATCH 058/145] [IMP] edi_core: trigger events w/ global edi.conf Co-authored-by: Arnau --- edi_core_oca/data/edi_configuration.xml | 12 ++++++++++++ edi_core_oca/models/edi_exchange_record.py | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/edi_core_oca/data/edi_configuration.xml b/edi_core_oca/data/edi_configuration.xml index 565919c74..867212198 100644 --- a/edi_core_oca/data/edi_configuration.xml +++ b/edi_core_oca/data/edi_configuration.xml @@ -15,6 +15,18 @@ on_record_write Trigger when a record is updated + + + On record exchange done + on_edi_exchange_done + Trigger when a record exchange is done + + + On record exchange error + on_edi_exchange_error + Trigger when a record exchange has an error + + Send via email diff --git a/edi_core_oca/models/edi_exchange_record.py b/edi_core_oca/models/edi_exchange_record.py index 4cc9d86b7..ee86c86d3 100644 --- a/edi_core_oca/models/edi_exchange_record.py +++ b/edi_core_oca/models/edi_exchange_record.py @@ -533,8 +533,18 @@ def _notify_related_record(self, message, level="info"): rec._notify_related_record(message, level) def _trigger_edi_event(self, name, suffix=None, target=None, **kw): - """Hook to be implemented in other modules""" - pass + event_name = self._trigger_edi_event_make_name(name, suffix) + target = target or self + + global_configs = self.env["edi.configuration"].search( + [ + ("trigger", "=", event_name), + ("is_global", "=", True), + ] + ) + + for conf in global_configs: + conf.edi_exec_snippet_do(target, **kw) def _trigger_edi_event_make_name(self, name, suffix=None): return "on_edi_exchange_{name}{suffix}".format( From 0f28c663648ba7e9265b42bd00356a51182bc213 Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Thu, 14 May 2026 11:15:31 +0200 Subject: [PATCH 059/145] [IMP] edi_core: improve global edi.conf * full matching by type, backend and model * full test coverage --- edi_core_oca/models/edi_configuration.py | 29 +++ edi_core_oca/models/edi_exchange_record.py | 9 +- edi_core_oca/tests/test_edi_configuration.py | 251 +++++++++++++++++++ 3 files changed, 282 insertions(+), 7 deletions(-) diff --git a/edi_core_oca/models/edi_configuration.py b/edi_core_oca/models/edi_configuration.py index 795d141ce..9d08a308c 100644 --- a/edi_core_oca/models/edi_configuration.py +++ b/edi_core_oca/models/edi_configuration.py @@ -208,6 +208,35 @@ def edi_get_conf(self, trigger, backend=None): domain.append(("backend_id", "in", backend_ids)) return self.filtered_domain(domain) + @api.model + def edi_get_conf_global(self, exchange_record, trigger): + """Return active global configurations matching the given event. + + Unlike :meth:`edi_get_conf` -- which runs on a recordset of + configurations already linked to a partner -- global configurations + are not bound to any partner. We therefore have to derive the + filtering keys from the originating exchange record: + + * ``trigger`` must match the event code + * ``is_global`` must be True + * ``type_id`` must match the exchange type or be empty (applies to all) + * ``backend_id`` must match the backend or be empty (applies to all) + * ``model_name`` must match the related record model or be empty + (applies to all) + """ + related_model = exchange_record.model + model_options = [False] + if related_model: + model_options.append(related_model) + domain = [ + ("trigger", "=", trigger), + ("is_global", "=", True), + ("type_id", "in", [exchange_record.type_id.id, False]), + ("backend_id", "in", [exchange_record.backend_id.id, False]), + ("model_name", "in", model_options), + ] + return self.search(domain) + def action_view_partners(self): # TODO: add tests partner_model = self.env["res.partner"] diff --git a/edi_core_oca/models/edi_exchange_record.py b/edi_core_oca/models/edi_exchange_record.py index ee86c86d3..685a98bb0 100644 --- a/edi_core_oca/models/edi_exchange_record.py +++ b/edi_core_oca/models/edi_exchange_record.py @@ -535,14 +535,9 @@ def _notify_related_record(self, message, level="info"): def _trigger_edi_event(self, name, suffix=None, target=None, **kw): event_name = self._trigger_edi_event_make_name(name, suffix) target = target or self - - global_configs = self.env["edi.configuration"].search( - [ - ("trigger", "=", event_name), - ("is_global", "=", True), - ] + global_configs = self.env["edi.configuration"].edi_get_conf_global( + self, event_name ) - for conf in global_configs: conf.edi_exec_snippet_do(target, **kw) diff --git a/edi_core_oca/tests/test_edi_configuration.py b/edi_core_oca/tests/test_edi_configuration.py index 689a8f6c1..3e06cd944 100644 --- a/edi_core_oca/tests/test_edi_configuration.py +++ b/edi_core_oca/tests/test_edi_configuration.py @@ -152,3 +152,254 @@ def test_edi_code_snippet(self): ) # Check the new vals after execution self.assertEqual(vals, expected_value) + + +class TestEDIConfigurationGlobalEvents(EDIBackendCommonTestCase): + """Test the global event dispatch via edi.configuration. + + `EDIExchangeRecord._trigger_edi_event` looks up all `edi.configuration` + records flagged as `is_global` and matching the event trigger code, + then executes their `snippet_do` against the target record. + These tests verify the dispatch happens for all `notify_*` events + and that the proper target (exchange record vs related record) + is passed to the snippet. + """ + + # Snippet appends a marker per call so we can verify multiple invocations + # against different targets within the same transaction. + _marker_snippet = "conf.write({'description': (conf.description or '') + '|' + record._name})" + + @classmethod + def setUpClass(cls): + super().setUpClass() + vals = { + "model": cls.partner._name, + "res_id": cls.partner.id, + } + cls.record = cls.backend.create_record("test_csv_output", vals) + cls.trigger_model = cls.env["edi.configuration.trigger"] + cls.conf_model = cls.env["edi.configuration"] + # Reuse existing data triggers when available, create the missing ones. + cls.trigger_done = cls.env.ref("edi_core_oca.edi_config_trigger_record_done") + cls.trigger_error = cls.env.ref("edi_core_oca.edi_config_trigger_record_error") + cls.trigger_ack_received = cls._get_or_create_trigger( + "on_edi_exchange_done_ack_received", "On ACK received" + ) + cls.trigger_ack_missing = cls._get_or_create_trigger( + "on_edi_exchange_done_ack_missing", "On ACK missing" + ) + cls.trigger_ack_received_error = cls._get_or_create_trigger( + "on_edi_exchange_done_ack_received_error", "On ACK received error" + ) + cls.trigger_generate_complete = cls._get_or_create_trigger( + "on_edi_exchange_generate_complete", "On generate complete" + ) + + @classmethod + def _get_or_create_trigger(cls, code, name): + trigger = cls.trigger_model.search([("code", "=", code)], limit=1) + if not trigger: + trigger = cls.trigger_model.create({"name": name, "code": code}) + return trigger + + def _make_conf(self, trigger, name, is_global=True, snippet=None, **overrides): + vals = { + "name": name, + "active": True, + "backend_id": self.backend.id, + "type_id": self.exchange_type_out.id, + "trigger_id": trigger.id, + "is_global": is_global, + "snippet_do": snippet or self._marker_snippet, + } + vals.update(overrides) + return self.conf_model.create(vals) + + def test_notify_done_triggers_global_conf(self): + conf = self._make_conf(self.trigger_done, "Global Done") + self.record._notify_done() + self.assertEqual(conf.description, f"|{self.record._name}") + + def test_notify_error_triggers_global_conf(self): + conf = self._make_conf(self.trigger_error, "Global Error") + self.record._notify_error("send_ko") + self.assertEqual(conf.description, f"|{self.record._name}") + + def test_notify_ack_received_triggers_global_conf(self): + conf = self._make_conf(self.trigger_ack_received, "Global ACK received") + self.record._notify_ack_received() + self.assertEqual(conf.description, f"|{self.record._name}") + + def test_notify_ack_missing_triggers_global_conf(self): + conf = self._make_conf(self.trigger_ack_missing, "Global ACK missing") + self.record._notify_ack_missing() + self.assertEqual(conf.description, f"|{self.record._name}") + + def test_notify_ack_received_error_triggers_global_conf(self): + conf = self._make_conf( + self.trigger_ack_received_error, "Global ACK received error" + ) + self.record._notify_ack_received_error() + self.assertEqual(conf.description, f"|{self.record._name}") + + def test_non_global_conf_is_ignored(self): + conf = self._make_conf(self.trigger_done, "Non Global Done", is_global=False) + self.record._notify_done() + self.assertFalse(conf.description) + + def test_inactive_global_conf_is_ignored(self): + conf = self._make_conf(self.trigger_done, "Inactive Global Done") + conf.active = False + self.record._notify_done() + self.assertFalse(conf.description) + + def test_notify_action_complete_dispatches_to_both_targets(self): + """`notify_action_complete` fires the event twice when the related + record exists: once with the exchange record as target, once with the + related record (partner here).""" + conf = self._make_conf( + self.trigger_generate_complete, "Global generate complete" + ) + # Sanity check: the exchange record has a related record. + self.assertTrue(self.record.related_record_exists) + self.record.notify_action_complete("generate") + # The snippet appended one marker per call: exchange record then partner. + self.assertEqual( + conf.description, + f"|{self.record._name}|{self.partner._name}", + ) + + def test_notify_action_complete_no_related_record(self): + """When no related record exists, the event fires only on the + exchange record itself.""" + conf = self._make_conf( + self.trigger_generate_complete, "Global generate complete - no related" + ) + # Create an exchange record with no related record. + orphan_record = self.backend.create_record( + "test_csv_output", {"model": False, "res_id": False} + ) + orphan_record.notify_action_complete("generate") + self.assertEqual(conf.description, f"|{orphan_record._name}") + + def test_snippet_receives_conf_and_record(self): + """The snippet eval context must expose both `conf` (the configuration) + and `record` (the target of the event).""" + snippet = ( + "conf.write({'description': 'conf=%s|record=%s' % " + "(conf.name, record.display_name)})" + ) + conf = self._make_conf(self.trigger_done, "Context check", snippet=snippet) + self.record._notify_done() + self.assertEqual( + conf.description, + f"conf={conf.name}|record={self.record.display_name}", + ) + + def test_multiple_global_confs_all_executed(self): + """All global confs matching the trigger are executed.""" + conf1 = self._make_conf(self.trigger_done, "Global Done 1") + conf2 = self._make_conf(self.trigger_done, "Global Done 2") + self.record._notify_done() + self.assertEqual(conf1.description, f"|{self.record._name}") + self.assertEqual(conf2.description, f"|{self.record._name}") + + # ------------------------------------------------------------------ + # Filtering tests for `edi_get_conf_global` + # ------------------------------------------------------------------ + def test_filter_by_type_mismatch(self): + """A conf bound to a different exchange type must not fire.""" + conf = self._make_conf( + self.trigger_done, + "Wrong type", + type_id=self.exchange_type_in.id, + ) + self.record._notify_done() + self.assertFalse(conf.description) + + def test_filter_by_type_empty_matches(self): + """A conf without a type matches any exchange record's type.""" + conf = self._make_conf(self.trigger_done, "No type", type_id=False) + self.record._notify_done() + self.assertEqual(conf.description, f"|{self.record._name}") + + def test_filter_by_backend_mismatch(self): + """A conf bound to a different backend must not fire.""" + other_backend = self.env["edi.backend"].create( + { + "name": "Other backend", + "backend_type_id": self.backend.backend_type_id.id, + } + ) + # `_constrains_backend` requires backend to be compatible with the type's + # backend if the type has one set. Detach the type from the conf to test + # only the backend filter. + conf = self._make_conf( + self.trigger_done, + "Wrong backend", + backend_id=other_backend.id, + type_id=False, + ) + self.record._notify_done() + self.assertFalse(conf.description) + + def test_filter_by_backend_empty_matches(self): + """A conf without a backend matches any exchange record's backend.""" + conf = self._make_conf( + self.trigger_done, + "No backend", + backend_id=False, + type_id=False, + ) + self.record._notify_done() + self.assertEqual(conf.description, f"|{self.record._name}") + + def test_filter_by_model_mismatch(self): + """A conf bound to a different model must not fire.""" + other_model = self.env["ir.model"]._get("res.users") + conf = self._make_conf( + self.trigger_done, + "Wrong model", + model_id=other_model.id, + ) + self.record._notify_done() + self.assertFalse(conf.description) + + def test_filter_by_model_match(self): + """A conf bound to the related record model fires.""" + partner_model = self.env["ir.model"]._get(self.partner._name) + conf = self._make_conf( + self.trigger_done, + "Matching model", + model_id=partner_model.id, + ) + self.record._notify_done() + self.assertEqual(conf.description, f"|{self.record._name}") + + def test_filter_by_model_orphan_record(self): + """A conf with a model is skipped on records with no related model.""" + partner_model = self.env["ir.model"]._get(self.partner._name) + conf_with_model = self._make_conf( + self.trigger_done, + "Model bound", + model_id=partner_model.id, + ) + conf_no_model = self._make_conf(self.trigger_done, "Model-less") + orphan_record = self.backend.create_record( + "test_csv_output", {"model": False, "res_id": False} + ) + orphan_record._notify_done() + self.assertFalse(conf_with_model.description) + self.assertEqual(conf_no_model.description, f"|{orphan_record._name}") + + def test_edi_get_conf_global_returns_only_matching(self): + """Direct check on the new helper method.""" + matching = self._make_conf(self.trigger_done, "Matching") + wrong_trigger = self._make_conf(self.trigger_error, "Wrong trigger") + non_global = self._make_conf(self.trigger_done, "Non global", is_global=False) + result = self.env["edi.configuration"].edi_get_conf_global( + self.record, self.trigger_done.code + ) + self.assertIn(matching, result) + self.assertNotIn(wrong_trigger, result) + self.assertNotIn(non_global, result) From 9dc23550f3785df93515820e0b25aab445ad4ea0 Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Thu, 14 May 2026 11:38:31 +0200 Subject: [PATCH 060/145] [DOC] edi_core: add minimal docs for edi.conf --- edi_core_oca/readme/CONFIGURE.md | 95 ++++++++++++++++++++++++++++++ edi_core_oca/readme/DESCRIPTION.md | 9 ++- 2 files changed, 103 insertions(+), 1 deletion(-) diff --git a/edi_core_oca/readme/CONFIGURE.md b/edi_core_oca/readme/CONFIGURE.md index 48045deba..a1957bbe0 100644 --- a/edi_core_oca/readme/CONFIGURE.md +++ b/edi_core_oca/readme/CONFIGURE.md @@ -63,3 +63,98 @@ backend to be used for the exchange. In case of "Custom" kind, you'll have to define your own logic to do something. + +## Custom event handlers via `edi.configuration` + +The framework can dispatch EDI lifecycle events to user-defined +configurations, providing a declarative alternative to component events. +Each `edi.configuration` record links a **trigger** (an +`edi.configuration.trigger` code) to a **snippet** (`snippet_do`) that is +executed every time the matching event fires on an exchange record. + +Built-in events fired by `EDIExchangeRecord` include: + +- `on_edi_exchange_done` — exchange processed successfully +- `on_edi_exchange_error` — exchange ended in error +- `on_edi_exchange_done_ack_received` — ACK file received +- `on_edi_exchange_done_ack_missing` — expected ACK not received +- `on_edi_exchange_done_ack_received_error` — ACK received with errors +- `on_edi_exchange__complete` — generic action completion (e.g. + `generate_complete`, `send_complete`), fired once on the exchange + record and once on its related record when present + +The snippet receives at least two variables in its evaluation context: + +- `conf` — the current `edi.configuration` record +- `record` — the target of the event (either the `edi.exchange.record` + itself or its related business record) + +Plus the standard `edi_exec_snippet_do` extras (`operation`, +`edi_action`, `old_value`, `vals`, ...). + +Two complementary lookup modes are available, and they can be combined +freely on the same flow. + +### Global event configurations + +Use this mode when you want a configuration to react to events on **any +business record** that travels through EDI, with no per-partner setup. + +Tick **Global Configuration** (`is_global`) on the `edi.configuration`. +When an event fires, the framework calls +`edi.configuration.edi_get_conf_global(exchange_record, trigger)` which +selects all active global configurations whose `trigger` matches the +event code, filtered by the originating exchange record: + +- **Exchange type** (`type_id`): must match the exchange record's type, + or be left empty to apply to every type +- **Backend** (`backend_id`): must match the exchange record's backend, + or be left empty to apply to every backend +- **Model** (`model_id` / `model_name`): must match the related record + model (e.g. `sale.order`, `account.move`), or be left empty to apply + to every model + +Empty values mean "applies to all". Inactive configurations and +non-global configurations are ignored. All matching configurations are +executed in sequence. + +Typical use cases: + +- Posting a generic chatter message on every exchange that ends in error +- Pushing a notification to an external system every time an ACK is + received for a given backend +- Logging extra audit information for every exchange of a given type + +### Partner-specific (relation-based) event configurations + +Use this mode when the reaction must depend on the partner (or any +other related record) involved in the exchange. + +In this case configurations are **not** marked as global. Instead, the +business record exposes an `edi_config_ids` relation (via +`edi.exchange.consumer.mixin._edi_config_field_relation`, which by +default returns `self.env["edi.configuration"]` and can be overridden, +for example to point at `self.partner_id.edi_config_ids`). When an +event fires on the business record (e.g. on create, on write, +on send-via-email/EDI), the framework calls +`edi_confs.edi_get_conf(trigger)` on that relation and runs the +matching snippets. + +Compared with global configurations: + +- **Discovery** comes from the record's own relation, not from a + database-wide search; this is the right place to model "this partner + wants this behaviour" rules +- **Filtering** is reduced to `trigger` and (optionally) `backend_id`, + since the recordset is already narrowed by the relation +- The same `snippet_do` API applies, so a snippet can be reused + verbatim between global and partner-specific configurations + +Typical use cases: + +- Sending a specific EDI flow only for a subset of partners +- Customising the document generation per customer (e.g. different + email template, different transport) +- Switching between EDI and email delivery based on partner + preferences + diff --git a/edi_core_oca/readme/DESCRIPTION.md b/edi_core_oca/readme/DESCRIPTION.md index 8cfcb472b..f9aee7085 100644 --- a/edi_core_oca/readme/DESCRIPTION.md +++ b/edi_core_oca/readme/DESCRIPTION.md @@ -8,4 +8,11 @@ Provides following models: 3. EDI Exchange Type, to define file types of exchange 4. EDI Exchange Record, to define a record exchanged between systems -Also define a mixin to be inherited by records that will generate EDIs +Also define a mixin to be inherited by records that will generate EDIs. + +In addition, the module ships an ``edi.configuration`` mechanism that lets +users react to EDI events declaratively, by writing small Python snippets +attached to event triggers. This can be used as a lightweight alternative +to component event listeners: configurations can react globally (on any +exchange) or be scoped to a specific partner (or any related record), +exchange type, backend and target model. See ``CONFIGURE.md`` for details. From abeda5ea3c3d3d01be032046ea9a505bb653839e Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Thu, 14 May 2026 11:39:43 +0200 Subject: [PATCH 061/145] [DOC] edi_core: add readme/newsfragments --- edi_core_oca/readme/newsfragments/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 edi_core_oca/readme/newsfragments/.gitkeep diff --git a/edi_core_oca/readme/newsfragments/.gitkeep b/edi_core_oca/readme/newsfragments/.gitkeep new file mode 100644 index 000000000..e69de29bb From bbc55a344429755122a2229201510a2a9a04df7c Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Thu, 14 May 2026 11:54:21 +0200 Subject: [PATCH 062/145] [DOC] edi_core: update newfragments --- .../global-edi-conf-events.feature | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 edi_core_oca/readme/newsfragments/global-edi-conf-events.feature diff --git a/edi_core_oca/readme/newsfragments/global-edi-conf-events.feature b/edi_core_oca/readme/newsfragments/global-edi-conf-events.feature new file mode 100644 index 000000000..d2678fe28 --- /dev/null +++ b/edi_core_oca/readme/newsfragments/global-edi-conf-events.feature @@ -0,0 +1,20 @@ +Introduce a new system for **global EDI events** based on ``edi.configuration`` +that can replace the use of component events. + +Any ``edi.configuration`` flagged as ``is_global`` is now picked up by +``EDIExchangeRecord._trigger_edi_event`` and its ``snippet_do`` is executed +whenever the matching event fires (``done``, ``error``, ``ack_received``, +``ack_missing``, ``ack_received_error``, ``_complete``, ...). + +Filtering is performed via the new ``edi.configuration.edi_get_conf_global`` +model method, which selects active global configurations matching the event +trigger code and, when set, the exchange type, the backend and the related +record model carried by the exchange record (empty values still mean "applies +to all"). This lets integrators subscribe to EDI events declaratively from +the UI instead of writing component listeners. + +Full test coverage is included for the dispatch on all ``notify_*`` events +(both on the exchange record and on the related record target) and for the +new filtering rules. + +Last but not lease: add minimal docs for edi.configuration. From 7ea42af10a5c6faec7efddb2e99e5e46317ed155 Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Thu, 14 May 2026 13:02:54 +0200 Subject: [PATCH 063/145] [FIX] edi_core: fix edi.configuration._constrains_backend No comparison if backend is not set or type is not set. --- edi_core_oca/models/edi_configuration.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/edi_core_oca/models/edi_configuration.py b/edi_core_oca/models/edi_configuration.py index 9d08a308c..82bade7d5 100644 --- a/edi_core_oca/models/edi_configuration.py +++ b/edi_core_oca/models/edi_configuration.py @@ -78,12 +78,14 @@ class EdiConfiguration(models.Model): @api.constrains("backend_id", "type_id") def _constrains_backend(self): for rec in self: + if not rec.backend_id: + continue if rec.type_id.backend_id: if rec.type_id.backend_id != rec.backend_id: raise exceptions.ValidationError( self.env._("Backend must match with exchange type's backend!") ) - else: + elif rec.type_id: if rec.type_id.backend_type_id != rec.backend_id.backend_type_id: raise exceptions.ValidationError( self.env._( From 40e51cf2942d78ed8dfab208fc3034b7beb61e9b Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Thu, 14 May 2026 13:03:37 +0200 Subject: [PATCH 064/145] fixup! [IMP] edi_core: improve global edi.conf --- edi_core_oca/tests/test_edi_configuration.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/edi_core_oca/tests/test_edi_configuration.py b/edi_core_oca/tests/test_edi_configuration.py index 3e06cd944..d624b697e 100644 --- a/edi_core_oca/tests/test_edi_configuration.py +++ b/edi_core_oca/tests/test_edi_configuration.py @@ -167,7 +167,9 @@ class TestEDIConfigurationGlobalEvents(EDIBackendCommonTestCase): # Snippet appends a marker per call so we can verify multiple invocations # against different targets within the same transaction. - _marker_snippet = "conf.write({'description': (conf.description or '') + '|' + record._name})" + _marker_snippet = ( + "conf.write({'description': (conf.description or '') + '|' + record._name})" + ) @classmethod def setUpClass(cls): From d941213dfd911efb736384710bfd9a6f57cb276a Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Thu, 14 May 2026 13:58:39 +0200 Subject: [PATCH 065/145] edi_record_metadata: dev status -> Beta --- edi_record_metadata_oca/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edi_record_metadata_oca/__manifest__.py b/edi_record_metadata_oca/__manifest__.py index 050f49fac..566c7eb34 100644 --- a/edi_record_metadata_oca/__manifest__.py +++ b/edi_record_metadata_oca/__manifest__.py @@ -8,7 +8,7 @@ Allow to store metadata for related records. """, "version": "18.0.1.0.4", - "development_status": "Alpha", + "development_status": "Beta", "license": "LGPL-3", "website": "https://github.com/OCA/edi-framework", "author": "Camptocamp, Odoo Community Association (OCA)", From fa096d201c0f47a2309fb9ac134f3e28a8b5d8bb Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 14 May 2026 12:53:30 +0000 Subject: [PATCH 066/145] [BOT] post-merge updates --- README.md | 2 +- edi_record_metadata_oca/__manifest__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aecae8c89..7eec74965 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ addon | version | maintainers | summary [edi_party_data_oca](edi_party_data_oca/) | 18.0.1.0.1 | simahawk | Allow to configure and retrieve party information for EDI exchanges. [edi_product_oca](edi_product_oca/) | 18.0.1.0.0 | | EDI framework configuration and base logic for products and products packaging [edi_queue_oca](edi_queue_oca/) | 18.0.1.0.2 | | Set Queue Jobs on EDI -[edi_record_metadata_oca](edi_record_metadata_oca/) | 18.0.1.0.4 | simahawk | Allow to store metadata for related records. +[edi_record_metadata_oca](edi_record_metadata_oca/) | 18.0.1.0.5 | simahawk | Allow to store metadata for related records. [edi_sale_endpoint](edi_sale_endpoint/) | 18.0.1.0.0 | simahawk | Glue module between edi_sale_oca and edi_endpoint_oca. [edi_sale_input_oca](edi_sale_input_oca/) | 18.0.1.0.2 | simahawk | Process incoming sale orders with the EDI framework. [edi_sale_oca](edi_sale_oca/) | 18.0.1.0.1 | simahawk | Configuration and special behaviors for EDI on sales. diff --git a/edi_record_metadata_oca/__manifest__.py b/edi_record_metadata_oca/__manifest__.py index 566c7eb34..4dec99089 100644 --- a/edi_record_metadata_oca/__manifest__.py +++ b/edi_record_metadata_oca/__manifest__.py @@ -7,7 +7,7 @@ "summary": """ Allow to store metadata for related records. """, - "version": "18.0.1.0.4", + "version": "18.0.1.0.5", "development_status": "Beta", "license": "LGPL-3", "website": "https://github.com/OCA/edi-framework", From c8669d55760d0d10d1cc3d2dae98106a0887aea9 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 19 May 2026 10:50:39 +0000 Subject: [PATCH 067/145] [BOT] post-merge updates --- README.md | 2 +- edi_core_oca/README.rst | 2 +- edi_core_oca/__manifest__.py | 2 +- edi_core_oca/static/description/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7eec74965..6c1d37f67 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ addon | version | maintainers | summary [edi_account_core_oca](edi_account_core_oca/) | 18.0.1.1.1 | etobella | Define EDI Configuration for Account Moves [edi_account_oca](edi_account_oca/) | 18.0.1.1.1 | etobella | Define some component listeners for Account Moves [edi_component_oca](edi_component_oca/) | 18.0.1.0.3 | simahawk etobella | Allow to use Connector as a source in EDI -[edi_core_oca](edi_core_oca/) | 18.0.1.6.6 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. +[edi_core_oca](edi_core_oca/) | 18.0.1.6.7 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. [edi_endpoint_oca](edi_endpoint_oca/) | 18.0.1.0.3 | | Base module allowing configuration of custom endpoints for EDI framework. [edi_exchange_template_oca](edi_exchange_template_oca/) | 18.0.1.3.3 | simahawk | Allows definition of exchanges via templates. [edi_exchange_template_party_data](edi_exchange_template_party_data/) | 18.0.1.0.1 | simahawk | Glue module between edi_exchange_template and edi_party_data diff --git a/edi_core_oca/README.rst b/edi_core_oca/README.rst index bb985bd0d..0843611f1 100644 --- a/edi_core_oca/README.rst +++ b/edi_core_oca/README.rst @@ -11,7 +11,7 @@ EDI !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:c609033733302fa71a3c01c11e2729fd2b47ccde0b9a1d0619bed03cc26db4fe + !! source digest: sha256:5c628265afabdb3f35660663f16f4a2f3723be87ea0a236fff1f36b19ab00947 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/edi_core_oca/__manifest__.py b/edi_core_oca/__manifest__.py index a2929a7ab..7b0b2fa87 100644 --- a/edi_core_oca/__manifest__.py +++ b/edi_core_oca/__manifest__.py @@ -9,7 +9,7 @@ Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. """, - "version": "18.0.1.6.6", + "version": "18.0.1.6.7", "website": "https://github.com/OCA/edi-framework", "development_status": "Beta", "license": "LGPL-3", diff --git a/edi_core_oca/static/description/index.html b/edi_core_oca/static/description/index.html index 0273741fe..84618feea 100644 --- a/edi_core_oca/static/description/index.html +++ b/edi_core_oca/static/description/index.html @@ -372,7 +372,7 @@

    EDI

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:c609033733302fa71a3c01c11e2729fd2b47ccde0b9a1d0619bed03cc26db4fe +!! source digest: sha256:5c628265afabdb3f35660663f16f4a2f3723be87ea0a236fff1f36b19ab00947 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

    Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

    Base EDI backend.

    From e5da5b608d24a7d11951a2e7985ac21f98ecf512 Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Tue, 19 May 2026 12:52:36 +0200 Subject: [PATCH 068/145] edi_component: fix _trigger_edi_event to preserve event name The event name would be prefixed 2 times when calling super. --- edi_component_oca/models/edi_exchange_record.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edi_component_oca/models/edi_exchange_record.py b/edi_component_oca/models/edi_exchange_record.py index c37c17f93..b6105c0d5 100644 --- a/edi_component_oca/models/edi_exchange_record.py +++ b/edi_component_oca/models/edi_exchange_record.py @@ -10,7 +10,7 @@ class EdiExchangeRecord(models.Model): def _trigger_edi_event(self, name, suffix=None, target=None, **kw): """Trigger a component event linked to this backend and edi exchange.""" - name = self._trigger_edi_event_make_name(name, suffix=suffix) + event_name = self._trigger_edi_event_make_name(name, suffix=suffix) target = target or self - target._event(name).notify(self, **kw) + target._event(event_name).notify(self, **kw) return super()._trigger_edi_event(name, suffix=suffix, target=target, **kw) From 08afd00537ae4280d18b71738aa29de8ec980742 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Wed, 20 May 2026 06:19:59 +0000 Subject: [PATCH 069/145] [UPD] Update edi_core_oca.pot --- edi_core_oca/i18n/edi_core_oca.pot | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/edi_core_oca/i18n/edi_core_oca.pot b/edi_core_oca/i18n/edi_core_oca.pot index 436bf77b7..35b6d0b94 100644 --- a/edi_core_oca/i18n/edi_core_oca.pot +++ b/edi_core_oca/i18n/edi_core_oca.pot @@ -1005,6 +1005,11 @@ msgstr "" msgid "Generator" msgstr "" +#. module: edi_core_oca +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration__is_global +msgid "Global Configuration" +msgstr "" + #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_search @@ -1069,6 +1074,13 @@ msgstr "" msgid "If checked, some messages have a delivery error." msgstr "" +#. module: edi_core_oca +#: model:ir.model.fields,help:edi_core_oca.field_edi_configuration__is_global +msgid "" +"If checked, this configuration will be executed for all records, regardless " +"of the partner relation." +msgstr "" + #. module: edi_core_oca #: model:ir.model.fields,help:edi_core_oca.field_edi_exchange_type__exchange_filename_sequence_id msgid "" From 5a34f6eaf93bde3daadb2a19d16a33d05d12b046 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Wed, 20 May 2026 06:20:01 +0000 Subject: [PATCH 070/145] [UPD] Update edi_oca.pot --- edi_oca/i18n/edi_oca.pot | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/edi_oca/i18n/edi_oca.pot b/edi_oca/i18n/edi_oca.pot index f3babc523..543fed99d 100644 --- a/edi_oca/i18n/edi_oca.pot +++ b/edi_oca/i18n/edi_oca.pot @@ -882,6 +882,11 @@ msgstr "" msgid "Generator" msgstr "" +#. module: edi_oca +#: model:ir.model.fields,field_description:edi_oca.field_edi_configuration__is_global +msgid "Global Configuration" +msgstr "" + #. module: edi_oca #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_type_rule_view_search @@ -946,6 +951,13 @@ msgstr "" msgid "If checked, some messages have a delivery error." msgstr "" +#. module: edi_oca +#: model:ir.model.fields,help:edi_oca.field_edi_configuration__is_global +msgid "" +"If checked, this configuration will be executed for all records, regardless " +"of the partner relation." +msgstr "" + #. module: edi_oca #: model:ir.model.fields,help:edi_oca.field_edi_exchange_type__exchange_filename_sequence_id msgid "" From 9e2a8275a38820660e29701a11d92010da6adfbb Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 20 May 2026 06:26:55 +0000 Subject: [PATCH 071/145] [BOT] post-merge updates --- README.md | 4 +- edi_component_oca/README.rst | 2 +- edi_component_oca/__manifest__.py | 2 +- .../static/description/index.html | 2 +- edi_core_oca/README.rst | 143 ++++++++++++- edi_core_oca/__manifest__.py | 2 +- edi_core_oca/readme/HISTORY.md | 24 +++ .../global-edi-conf-events.feature | 20 -- edi_core_oca/static/description/index.html | 189 +++++++++++++++--- 9 files changed, 336 insertions(+), 52 deletions(-) create mode 100644 edi_core_oca/readme/HISTORY.md delete mode 100644 edi_core_oca/readme/newsfragments/global-edi-conf-events.feature diff --git a/README.md b/README.md index 6c1d37f67..5e016a5ca 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ addon | version | maintainers | summary --- | --- | --- | --- [edi_account_core_oca](edi_account_core_oca/) | 18.0.1.1.1 | etobella | Define EDI Configuration for Account Moves [edi_account_oca](edi_account_oca/) | 18.0.1.1.1 | etobella | Define some component listeners for Account Moves -[edi_component_oca](edi_component_oca/) | 18.0.1.0.3 | simahawk etobella | Allow to use Connector as a source in EDI -[edi_core_oca](edi_core_oca/) | 18.0.1.6.7 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. +[edi_component_oca](edi_component_oca/) | 18.0.1.1.0 | simahawk etobella | Allow to use Connector as a source in EDI +[edi_core_oca](edi_core_oca/) | 18.0.1.7.0 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. [edi_endpoint_oca](edi_endpoint_oca/) | 18.0.1.0.3 | | Base module allowing configuration of custom endpoints for EDI framework. [edi_exchange_template_oca](edi_exchange_template_oca/) | 18.0.1.3.3 | simahawk | Allows definition of exchanges via templates. [edi_exchange_template_party_data](edi_exchange_template_party_data/) | 18.0.1.0.1 | simahawk | Glue module between edi_exchange_template and edi_party_data diff --git a/edi_component_oca/README.rst b/edi_component_oca/README.rst index db2cffdd7..06d07a3d0 100644 --- a/edi_component_oca/README.rst +++ b/edi_component_oca/README.rst @@ -11,7 +11,7 @@ Edi Connector Oca !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:81c11c0d670f363513d25e5d2d6cb038f1fc56580f20c837c2d2a7665798018d + !! source digest: sha256:6c5e69ae42fdaaaf428ee2b9d0a8e14ba1b5515b6fd5daa7ca926cb5800567b4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/edi_component_oca/__manifest__.py b/edi_component_oca/__manifest__.py index fa8111718..c589696e7 100644 --- a/edi_component_oca/__manifest__.py +++ b/edi_component_oca/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Edi Connector Oca", "summary": """Allow to use Connector as a source in EDI""", - "version": "18.0.1.0.3", + "version": "18.0.1.1.0", "license": "LGPL-3", "author": "ACSONE,Dixmit,Camptocamp,Odoo Community Association (OCA)", "maintainers": ["simahawk", "etobella"], diff --git a/edi_component_oca/static/description/index.html b/edi_component_oca/static/description/index.html index e6128b6fa..f256369c0 100644 --- a/edi_component_oca/static/description/index.html +++ b/edi_component_oca/static/description/index.html @@ -372,7 +372,7 @@

    Edi Connector Oca

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:81c11c0d670f363513d25e5d2d6cb038f1fc56580f20c837c2d2a7665798018d +!! source digest: sha256:6c5e69ae42fdaaaf428ee2b9d0a8e14ba1b5515b6fd5daa7ca926cb5800567b4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

    Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

    This module allows to use components to handle code to execute on EDI diff --git a/edi_core_oca/README.rst b/edi_core_oca/README.rst index 0843611f1..55bdc1e55 100644 --- a/edi_core_oca/README.rst +++ b/edi_core_oca/README.rst @@ -11,7 +11,7 @@ EDI !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:5c628265afabdb3f35660663f16f4a2f3723be87ea0a236fff1f36b19ab00947 + !! source digest: sha256:27258fb23153f2660be19d7c76b04c4d09d35d1e240b779076c7f4a9fa66d9f2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -42,7 +42,15 @@ Provides following models: 3. EDI Exchange Type, to define file types of exchange 4. EDI Exchange Record, to define a record exchanged between systems -Also define a mixin to be inherited by records that will generate EDIs +Also define a mixin to be inherited by records that will generate EDIs. + +In addition, the module ships an ``edi.configuration`` mechanism that +lets users react to EDI events declaratively, by writing small Python +snippets attached to event triggers. This can be used as a lightweight +alternative to component event listeners: configurations can react +globally (on any exchange) or be scoped to a specific partner (or any +related record), exchange type, backend and target model. See +``CONFIGURE.md`` for details. **Table of contents** @@ -130,6 +138,104 @@ backend to be used for the exchange. In case of "Custom" kind, you'll have to define your own logic to do something. +Custom event handlers via ``edi.configuration`` +----------------------------------------------- + +The framework can dispatch EDI lifecycle events to user-defined +configurations, providing a declarative alternative to component events. +Each ``edi.configuration`` record links a **trigger** (an +``edi.configuration.trigger`` code) to a **snippet** (``snippet_do``) +that is executed every time the matching event fires on an exchange +record. + +Built-in events fired by ``EDIExchangeRecord`` include: + +- ``on_edi_exchange_done`` — exchange processed successfully +- ``on_edi_exchange_error`` — exchange ended in error +- ``on_edi_exchange_done_ack_received`` — ACK file received +- ``on_edi_exchange_done_ack_missing`` — expected ACK not received +- ``on_edi_exchange_done_ack_received_error`` — ACK received with errors +- ``on_edi_exchange__complete`` — generic action completion + (e.g. ``generate_complete``, ``send_complete``), fired once on the + exchange record and once on its related record when present + +The snippet receives at least two variables in its evaluation context: + +- ``conf`` — the current ``edi.configuration`` record +- ``record`` — the target of the event (either the + ``edi.exchange.record`` itself or its related business record) + +Plus the standard ``edi_exec_snippet_do`` extras (``operation``, +``edi_action``, ``old_value``, ``vals``, ...). + +Two complementary lookup modes are available, and they can be combined +freely on the same flow. + +Global event configurations +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use this mode when you want a configuration to react to events on **any +business record** that travels through EDI, with no per-partner setup. + +Tick **Global Configuration** (``is_global``) on the +``edi.configuration``. When an event fires, the framework calls +``edi.configuration.edi_get_conf_global(exchange_record, trigger)`` +which selects all active global configurations whose ``trigger`` matches +the event code, filtered by the originating exchange record: + +- **Exchange type** (``type_id``): must match the exchange record's + type, or be left empty to apply to every type +- **Backend** (``backend_id``): must match the exchange record's + backend, or be left empty to apply to every backend +- **Model** (``model_id`` / ``model_name``): must match the related + record model (e.g. ``sale.order``, ``account.move``), or be left empty + to apply to every model + +Empty values mean "applies to all". Inactive configurations and +non-global configurations are ignored. All matching configurations are +executed in sequence. + +Typical use cases: + +- Posting a generic chatter message on every exchange that ends in error +- Pushing a notification to an external system every time an ACK is + received for a given backend +- Logging extra audit information for every exchange of a given type + +Partner-specific (relation-based) event configurations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use this mode when the reaction must depend on the partner (or any other +related record) involved in the exchange. + +In this case configurations are **not** marked as global. Instead, the +business record exposes an ``edi_config_ids`` relation (via +``edi.exchange.consumer.mixin._edi_config_field_relation``, which by +default returns ``self.env["edi.configuration"]`` and can be overridden, +for example to point at ``self.partner_id.edi_config_ids``). When an +event fires on the business record (e.g. on create, on write, on +send-via-email/EDI), the framework calls +``edi_confs.edi_get_conf(trigger)`` on that relation and runs the +matching snippets. + +Compared with global configurations: + +- **Discovery** comes from the record's own relation, not from a + database-wide search; this is the right place to model "this partner + wants this behaviour" rules +- **Filtering** is reduced to ``trigger`` and (optionally) + ``backend_id``, since the recordset is already narrowed by the + relation +- The same ``snippet_do`` API applies, so a snippet can be reused + verbatim between global and partner-specific configurations + +Typical use cases: + +- Sending a specific EDI flow only for a subset of partners +- Customising the document generation per customer (e.g. different email + template, different transport) +- Switching between EDI and email delivery based on partner preferences + Usage ===== @@ -182,6 +288,39 @@ Components dependancy has been removed and set on a new dependant module ``edi_component_oca``. Module ``edi_oca`` has been_renamed to ``edi_core_oca``. +Changelog +========= + +18.0.1.7.0 (2026-05-20) +----------------------- + +Features +~~~~~~~~ + +- Introduce a new system for **global EDI events** based on + ``edi.configuration`` that can replace the use of component events. + + Any ``edi.configuration`` flagged as ``is_global`` is now picked up by + ``EDIExchangeRecord._trigger_edi_event`` and its ``snippet_do`` is + executed whenever the matching event fires (``done``, ``error``, + ``ack_received``, ``ack_missing``, ``ack_received_error``, + ``_complete``, ...). + + Filtering is performed via the new + ``edi.configuration.edi_get_conf_global`` model method, which selects + active global configurations matching the event trigger code and, when + set, the exchange type, the backend and the related record model + carried by the exchange record (empty values still mean "applies to + all"). This lets integrators subscribe to EDI events declaratively + from the UI instead of writing component listeners. + + Full test coverage is included for the dispatch on all ``notify_*`` + events (both on the exchange record and on the related record target) + and for the new filtering rules. + + Last but not lease: add minimal docs for edi.configuration. + (`#global-edi-conf-events `__) + Bug Tracker =========== diff --git a/edi_core_oca/__manifest__.py b/edi_core_oca/__manifest__.py index 7b0b2fa87..c3a09f07b 100644 --- a/edi_core_oca/__manifest__.py +++ b/edi_core_oca/__manifest__.py @@ -9,7 +9,7 @@ Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. """, - "version": "18.0.1.6.7", + "version": "18.0.1.7.0", "website": "https://github.com/OCA/edi-framework", "development_status": "Beta", "license": "LGPL-3", diff --git a/edi_core_oca/readme/HISTORY.md b/edi_core_oca/readme/HISTORY.md new file mode 100644 index 000000000..755aa4d94 --- /dev/null +++ b/edi_core_oca/readme/HISTORY.md @@ -0,0 +1,24 @@ +## 18.0.1.7.0 (2026-05-20) + +### Features + +- Introduce a new system for **global EDI events** based on ``edi.configuration`` + that can replace the use of component events. + + Any ``edi.configuration`` flagged as ``is_global`` is now picked up by + ``EDIExchangeRecord._trigger_edi_event`` and its ``snippet_do`` is executed + whenever the matching event fires (``done``, ``error``, ``ack_received``, + ``ack_missing``, ``ack_received_error``, ``_complete``, ...). + + Filtering is performed via the new ``edi.configuration.edi_get_conf_global`` + model method, which selects active global configurations matching the event + trigger code and, when set, the exchange type, the backend and the related + record model carried by the exchange record (empty values still mean "applies + to all"). This lets integrators subscribe to EDI events declaratively from + the UI instead of writing component listeners. + + Full test coverage is included for the dispatch on all ``notify_*`` events + (both on the exchange record and on the related record target) and for the + new filtering rules. + + Last but not lease: add minimal docs for edi.configuration. ([#global-edi-conf-events](https://github.com/OCA/edi-framework/issues/global-edi-conf-events)) diff --git a/edi_core_oca/readme/newsfragments/global-edi-conf-events.feature b/edi_core_oca/readme/newsfragments/global-edi-conf-events.feature deleted file mode 100644 index d2678fe28..000000000 --- a/edi_core_oca/readme/newsfragments/global-edi-conf-events.feature +++ /dev/null @@ -1,20 +0,0 @@ -Introduce a new system for **global EDI events** based on ``edi.configuration`` -that can replace the use of component events. - -Any ``edi.configuration`` flagged as ``is_global`` is now picked up by -``EDIExchangeRecord._trigger_edi_event`` and its ``snippet_do`` is executed -whenever the matching event fires (``done``, ``error``, ``ack_received``, -``ack_missing``, ``ack_received_error``, ``_complete``, ...). - -Filtering is performed via the new ``edi.configuration.edi_get_conf_global`` -model method, which selects active global configurations matching the event -trigger code and, when set, the exchange type, the backend and the related -record model carried by the exchange record (empty values still mean "applies -to all"). This lets integrators subscribe to EDI events declaratively from -the UI instead of writing component listeners. - -Full test coverage is included for the dispatch on all ``notify_*`` events -(both on the exchange record and on the related record target) and for the -new filtering rules. - -Last but not lease: add minimal docs for edi.configuration. diff --git a/edi_core_oca/static/description/index.html b/edi_core_oca/static/description/index.html index 84618feea..de6475a29 100644 --- a/edi_core_oca/static/description/index.html +++ b/edi_core_oca/static/description/index.html @@ -372,7 +372,7 @@

    EDI

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:5c628265afabdb3f35660663f16f4a2f3723be87ea0a236fff1f36b19ab00947 +!! source digest: sha256:27258fb23153f2660be19d7c76b04c4d09d35d1e240b779076c7f4a9fa66d9f2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

    Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

    Base EDI backend.

    @@ -384,7 +384,14 @@

    EDI

  • EDI Exchange Type, to define file types of exchange
  • EDI Exchange Record, to define a record exchanged between systems
  • -

    Also define a mixin to be inherited by records that will generate EDIs

    +

    Also define a mixin to be inherited by records that will generate EDIs.

    +

    In addition, the module ships an edi.configuration mechanism that +lets users react to EDI events declaratively, by writing small Python +snippets attached to event triggers. This can be used as a lightweight +alternative to component event listeners: configurations can react +globally (on any exchange) or be scoped to a specific partner (or any +related record), exchange type, backend and target model. See +CONFIGURE.md for details.

    Table of contents

    +
    +

    Custom event handlers via edi.configuration

    +

    The framework can dispatch EDI lifecycle events to user-defined +configurations, providing a declarative alternative to component events. +Each edi.configuration record links a trigger (an +edi.configuration.trigger code) to a snippet (snippet_do) +that is executed every time the matching event fires on an exchange +record.

    +

    Built-in events fired by EDIExchangeRecord include:

    +
      +
    • on_edi_exchange_done — exchange processed successfully
    • +
    • on_edi_exchange_error — exchange ended in error
    • +
    • on_edi_exchange_done_ack_received — ACK file received
    • +
    • on_edi_exchange_done_ack_missing — expected ACK not received
    • +
    • on_edi_exchange_done_ack_received_error — ACK received with errors
    • +
    • on_edi_exchange_<action>_complete — generic action completion +(e.g. generate_complete, send_complete), fired once on the +exchange record and once on its related record when present
    • +
    +

    The snippet receives at least two variables in its evaluation context:

    +
      +
    • conf — the current edi.configuration record
    • +
    • record — the target of the event (either the +edi.exchange.record itself or its related business record)
    • +
    +

    Plus the standard edi_exec_snippet_do extras (operation, +edi_action, old_value, vals, …).

    +

    Two complementary lookup modes are available, and they can be combined +freely on the same flow.

    +
    +

    Global event configurations

    +

    Use this mode when you want a configuration to react to events on any +business record that travels through EDI, with no per-partner setup.

    +

    Tick Global Configuration (is_global) on the +edi.configuration. When an event fires, the framework calls +edi.configuration.edi_get_conf_global(exchange_record, trigger) +which selects all active global configurations whose trigger matches +the event code, filtered by the originating exchange record:

    +
      +
    • Exchange type (type_id): must match the exchange record’s +type, or be left empty to apply to every type
    • +
    • Backend (backend_id): must match the exchange record’s +backend, or be left empty to apply to every backend
    • +
    • Model (model_id / model_name): must match the related +record model (e.g. sale.order, account.move), or be left empty +to apply to every model
    • +
    +

    Empty values mean “applies to all”. Inactive configurations and +non-global configurations are ignored. All matching configurations are +executed in sequence.

    +

    Typical use cases:

    +
      +
    • Posting a generic chatter message on every exchange that ends in error
    • +
    • Pushing a notification to an external system every time an ACK is +received for a given backend
    • +
    • Logging extra audit information for every exchange of a given type
    • +
    +
    +
    +

    Partner-specific (relation-based) event configurations

    +

    Use this mode when the reaction must depend on the partner (or any other +related record) involved in the exchange.

    +

    In this case configurations are not marked as global. Instead, the +business record exposes an edi_config_ids relation (via +edi.exchange.consumer.mixin._edi_config_field_relation, which by +default returns self.env["edi.configuration"] and can be overridden, +for example to point at self.partner_id.edi_config_ids). When an +event fires on the business record (e.g. on create, on write, on +send-via-email/EDI), the framework calls +edi_confs.edi_get_conf(trigger) on that relation and runs the +matching snippets.

    +

    Compared with global configurations:

    +
      +
    • Discovery comes from the record’s own relation, not from a +database-wide search; this is the right place to model “this partner +wants this behaviour” rules
    • +
    • Filtering is reduced to trigger and (optionally) +backend_id, since the recordset is already narrowed by the +relation
    • +
    • The same snippet_do API applies, so a snippet can be reused +verbatim between global and partner-specific configurations
    • +
    +

    Typical use cases:

    +
      +
    • Sending a specific EDI flow only for a subset of partners
    • +
    • Customising the document generation per customer (e.g. different email +template, different transport)
    • +
    • Switching between EDI and email delivery based on partner preferences
    • +
    +
    +
    -

    Usage

    +

    Usage

    After certain operations or manual execution, Exchange records will be generated. This Exchange records might be input records or outputs records.

    The change of state can be manually executed by the system or be managed through by ir.cron.

    -

    Output Exchange records

    +

    Output Exchange records

    An output record is intended to be used for exchange information from Odoo to another system.

    The flow of an output record should be:

    @@ -509,7 +619,7 @@

    Output Exchange records

    -

    Input Exchange records

    +

    Input Exchange records

    An input record is intended to be used for exchange information another system to odoo.

    The flow of an input record should be:

    @@ -522,20 +632,51 @@

    Input Exchange records

    -

    Known issues / Roadmap

    +

    Known issues / Roadmap

    -

    14.0.1.0.0

    +

    14.0.1.0.0

    The module name has been changed from edi to edi_oca.

    -

    18.0.1.4.0

    +

    18.0.1.4.0

    Components dependancy has been removed and set on a new dependant module edi_component_oca. Module edi_oca has been_renamed to edi_core_oca.

    +
    +

    Changelog

    +
    +

    18.0.1.7.0 (2026-05-20)

    +
    +

    Features

    +
      +
    • Introduce a new system for global EDI events based on +edi.configuration that can replace the use of component events.

      +

      Any edi.configuration flagged as is_global is now picked up by +EDIExchangeRecord._trigger_edi_event and its snippet_do is +executed whenever the matching event fires (done, error, +ack_received, ack_missing, ack_received_error, +<action>_complete, …).

      +

      Filtering is performed via the new +edi.configuration.edi_get_conf_global model method, which selects +active global configurations matching the event trigger code and, when +set, the exchange type, the backend and the related record model +carried by the exchange record (empty values still mean “applies to +all”). This lets integrators subscribe to EDI events declaratively +from the UI instead of writing component listeners.

      +

      Full test coverage is included for the dispatch on all notify_* +events (both on the exchange record and on the related record target) +and for the new filtering rules.

      +

      Last but not lease: add minimal docs for edi.configuration. +(#global-edi-conf-events)

      +
    • +
    +
    +
    +
    -

    Bug Tracker

    +

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -543,9 +684,9 @@

    Bug Tracker

    Do not contact contributors directly about support or help with technical issues.

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • ACSONE
    • Dixmit
    • @@ -553,7 +694,7 @@

      Authors

    -

    Contributors

    +

    Contributors

    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association From ca8366437aed11916b1f84757dc100ea97e47efd Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 20 May 2026 06:27:09 +0000 Subject: [PATCH 072/145] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: edi-framework-18.0/edi-framework-18.0-edi_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_oca/ --- edi_oca/i18n/it.po | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/edi_oca/i18n/it.po b/edi_oca/i18n/it.po index 33faed5c2..d2cdce3ed 100644 --- a/edi_oca/i18n/it.po +++ b/edi_oca/i18n/it.po @@ -970,6 +970,11 @@ msgstr "Genera record di scambio" msgid "Generator" msgstr "Generatore" +#. module: edi_oca +#: model:ir.model.fields,field_description:edi_oca.field_edi_configuration__is_global +msgid "Global Configuration" +msgstr "" + #. module: edi_oca #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_type_rule_view_search @@ -1041,6 +1046,13 @@ msgstr "Se selezionata, nuovi messaggi richiedono attenzione." msgid "If checked, some messages have a delivery error." msgstr "Se selezionata, alcuni messaggi hanno un errore di consegna." +#. module: edi_oca +#: model:ir.model.fields,help:edi_oca.field_edi_configuration__is_global +msgid "" +"If checked, this configuration will be executed for all records, regardless " +"of the partner relation." +msgstr "" + #. module: edi_oca #: model:ir.model.fields,help:edi_oca.field_edi_exchange_type__exchange_filename_sequence_id msgid "" From f34cddb02472282b30e1d723a7ff12255ca414be Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 20 May 2026 06:27:09 +0000 Subject: [PATCH 073/145] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: edi-framework-18.0/edi-framework-18.0-edi_core_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_core_oca/ --- edi_core_oca/i18n/es.po | 12 ++++++++++++ edi_core_oca/i18n/fr.po | 12 ++++++++++++ edi_core_oca/i18n/it.po | 12 ++++++++++++ 3 files changed, 36 insertions(+) diff --git a/edi_core_oca/i18n/es.po b/edi_core_oca/i18n/es.po index 6aa91ccbc..ae4534243 100644 --- a/edi_core_oca/i18n/es.po +++ b/edi_core_oca/i18n/es.po @@ -1014,6 +1014,11 @@ msgstr "" msgid "Generator" msgstr "" +#. module: edi_core_oca +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration__is_global +msgid "Global Configuration" +msgstr "" + #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_search @@ -1078,6 +1083,13 @@ msgstr "" msgid "If checked, some messages have a delivery error." msgstr "" +#. module: edi_core_oca +#: model:ir.model.fields,help:edi_core_oca.field_edi_configuration__is_global +msgid "" +"If checked, this configuration will be executed for all records, regardless " +"of the partner relation." +msgstr "" + #. module: edi_core_oca #: model:ir.model.fields,help:edi_core_oca.field_edi_exchange_type__exchange_filename_sequence_id msgid "" diff --git a/edi_core_oca/i18n/fr.po b/edi_core_oca/i18n/fr.po index 28a967be4..b09c20623 100644 --- a/edi_core_oca/i18n/fr.po +++ b/edi_core_oca/i18n/fr.po @@ -1026,6 +1026,11 @@ msgstr "" msgid "Generator" msgstr "Générer" +#. module: edi_core_oca +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration__is_global +msgid "Global Configuration" +msgstr "" + #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_search @@ -1092,6 +1097,13 @@ msgstr "" msgid "If checked, some messages have a delivery error." msgstr "" +#. module: edi_core_oca +#: model:ir.model.fields,help:edi_core_oca.field_edi_configuration__is_global +msgid "" +"If checked, this configuration will be executed for all records, regardless " +"of the partner relation." +msgstr "" + #. module: edi_core_oca #: model:ir.model.fields,help:edi_core_oca.field_edi_exchange_type__exchange_filename_sequence_id msgid "" diff --git a/edi_core_oca/i18n/it.po b/edi_core_oca/i18n/it.po index 14ad64c81..737c2dedc 100644 --- a/edi_core_oca/i18n/it.po +++ b/edi_core_oca/i18n/it.po @@ -1099,6 +1099,11 @@ msgstr "Genera record di scambio" msgid "Generator" msgstr "Generatore" +#. module: edi_core_oca +#: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration__is_global +msgid "Global Configuration" +msgstr "" + #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_search #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_type_rule_view_search @@ -1170,6 +1175,13 @@ msgstr "Se selezionata, nuovi messaggi richiedono attenzione." msgid "If checked, some messages have a delivery error." msgstr "Se selezionata, alcuni messaggi hanno un errore di consegna." +#. module: edi_core_oca +#: model:ir.model.fields,help:edi_core_oca.field_edi_configuration__is_global +msgid "" +"If checked, this configuration will be executed for all records, regardless " +"of the partner relation." +msgstr "" + #. module: edi_core_oca #: model:ir.model.fields,help:edi_core_oca.field_edi_exchange_type__exchange_filename_sequence_id msgid "" From 91ec8c62ca7eebd355ec9e353e35eef216c63edb Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Mon, 14 Feb 2022 16:41:16 +0100 Subject: [PATCH 074/145] [ADD] edi_purchase_oca [UPD] Update edi_purchase_oca.pot [UPD] README.rst --- edi_purchase_oca/README.rst | 86 ++++ edi_purchase_oca/__init__.py | 1 + edi_purchase_oca/__manifest__.py | 15 + edi_purchase_oca/i18n/edi_purchase_oca.pot | 39 ++ edi_purchase_oca/models/__init__.py | 1 + edi_purchase_oca/models/purchase_order.py | 21 + edi_purchase_oca/readme/CONTRIBUTORS.rst | 1 + edi_purchase_oca/readme/DESCRIPTION.rst | 14 + edi_purchase_oca/static/description/icon.png | Bin 0 -> 5055 bytes .../static/description/index.html | 430 ++++++++++++++++++ .../views/edi_exchange_record_views.xml | 30 ++ .../views/purchase_order_views.xml | 28 ++ 12 files changed, 666 insertions(+) create mode 100644 edi_purchase_oca/README.rst create mode 100644 edi_purchase_oca/__init__.py create mode 100644 edi_purchase_oca/__manifest__.py create mode 100644 edi_purchase_oca/i18n/edi_purchase_oca.pot create mode 100644 edi_purchase_oca/models/__init__.py create mode 100644 edi_purchase_oca/models/purchase_order.py create mode 100644 edi_purchase_oca/readme/CONTRIBUTORS.rst create mode 100644 edi_purchase_oca/readme/DESCRIPTION.rst create mode 100644 edi_purchase_oca/static/description/icon.png create mode 100644 edi_purchase_oca/static/description/index.html create mode 100644 edi_purchase_oca/views/edi_exchange_record_views.xml create mode 100644 edi_purchase_oca/views/purchase_order_views.xml diff --git a/edi_purchase_oca/README.rst b/edi_purchase_oca/README.rst new file mode 100644 index 000000000..d54839902 --- /dev/null +++ b/edi_purchase_oca/README.rst @@ -0,0 +1,86 @@ +============ +EDI Purchase +============ + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github + :target: https://github.com/OCA/edi/tree/13.0/edi_purchase_oca + :alt: OCA/edi +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/edi-13-0/edi-13-0-edi_purchase_oca + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/226/13.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module intends to create a base to be extended by local edi rules +for purchase. + +In order to add a new integration, you need to create a listener: + +.. code-block:: python + + class MyEventListener(Component): + _name = "purchase.order.event.listener.demo" + _inherit = "base.event.listener" + _apply_on = ["purchase.order"] + + def on_button_confirm_purchase_order(self, move): + """Add your code here""" + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* ForgeFlow + +Contributors +~~~~~~~~~~~~ + +* Lois Rilo + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/edi `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/edi_purchase_oca/__init__.py b/edi_purchase_oca/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/edi_purchase_oca/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/edi_purchase_oca/__manifest__.py b/edi_purchase_oca/__manifest__.py new file mode 100644 index 000000000..c9ff3c686 --- /dev/null +++ b/edi_purchase_oca/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2022 ForgeFlow S.L. (https://www.forgeflow.com) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +{ + "name": "EDI Purchase", + "summary": """ + Define EDI Configuration for Purchase Orders""", + "version": "13.0.1.0.0", + "license": "LGPL-3", + "author": "ForgeFlow, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/edi", + "depends": ["purchase", "edi", "component_event"], + "data": ["views/purchase_order_views.xml", "views/edi_exchange_record_views.xml"], + "demo": [], +} diff --git a/edi_purchase_oca/i18n/edi_purchase_oca.pot b/edi_purchase_oca/i18n/edi_purchase_oca.pot new file mode 100644 index 000000000..872766122 --- /dev/null +++ b/edi_purchase_oca/i18n/edi_purchase_oca.pot @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * edi_purchase_oca +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: edi_purchase_oca +#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form +msgid "EDI" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_root +msgid "Exchange records" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model,name:edi_purchase_oca.model_purchase_order +msgid "Purchase Order" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.actions.act_window,name:edi_purchase_oca.act_open_edi_exchange_record_purchase_order_view +msgid "Purchase Order Exchange Record" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_exchange_record +msgid "Purchase Orders" +msgstr "" diff --git a/edi_purchase_oca/models/__init__.py b/edi_purchase_oca/models/__init__.py new file mode 100644 index 000000000..9f0353064 --- /dev/null +++ b/edi_purchase_oca/models/__init__.py @@ -0,0 +1 @@ +from . import purchase_order diff --git a/edi_purchase_oca/models/purchase_order.py b/edi_purchase_oca/models/purchase_order.py new file mode 100644 index 000000000..6ac69723e --- /dev/null +++ b/edi_purchase_oca/models/purchase_order.py @@ -0,0 +1,21 @@ +# Copyright 2022 ForgeFlow S.L. (https://www.forgeflow.com) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from odoo import models + + +class PurchaseOrder(models.Model): + _name = "purchase.order" + _inherit = ["purchase.order", "edi.exchange.consumer.mixin"] + + def button_confirm(self): + result = super().button_confirm() + if self: + self._event("on_button_confirm_purchase_order").notify(self) + return result + + def button_cancel(self): + result = super().button_cancel() + if self: + self._event("on_button_cancel_purchase_order").notify(self) + return result diff --git a/edi_purchase_oca/readme/CONTRIBUTORS.rst b/edi_purchase_oca/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..77dfbe89e --- /dev/null +++ b/edi_purchase_oca/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Lois Rilo diff --git a/edi_purchase_oca/readme/DESCRIPTION.rst b/edi_purchase_oca/readme/DESCRIPTION.rst new file mode 100644 index 000000000..9c5b5932c --- /dev/null +++ b/edi_purchase_oca/readme/DESCRIPTION.rst @@ -0,0 +1,14 @@ +This module intends to create a base to be extended by local edi rules +for purchase. + +In order to add a new integration, you need to create a listener: + +.. code-block:: python + + class MyEventListener(Component): + _name = "purchase.order.event.listener.demo" + _inherit = "base.event.listener" + _apply_on = ["purchase.order"] + + def on_button_confirm_purchase_order(self, move): + """Add your code here""" diff --git a/edi_purchase_oca/static/description/icon.png b/edi_purchase_oca/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a79752645ce327baadb6aba260751a044a5e4a8a GIT binary patch literal 5055 zcmd5=XIE3t*9{5;V(3VRNG}4?i&CV7st6&V6oEvF6lv0wjx;g!E(lU09Tk-y(rf5V zx9E4l0fcgy$!6M0|4~-{~84_!~7RH$ms`t=%gebpiwi21>hnx<7w{@OF~+ z@^#7ERpTOqK>t8+S3eIYfa?=4&kkJ56a*9^&*7zFR^!jX2>%jJ32a= z(UV45?0q~GO*2r$1A^;*PY{6WO2)-M6t{GTB>$X#S#MEAlAsncXcxRI3!=%8xIvZC z7aDz@a+AHkpiPra%^|`tz}Y46;01}(rR^{&xj8p?FT_QEse0^jg8?qgL1>K6K$qtH zkRmwJ_V?(3rYhxoKs29FBH&u&$n+nUPTyWL&hqAwN^eAmtEF;(d$3Sd@q+Z`9pz}E25?EgDKm)gkQBp5*dT3Bf7o+dcYcyNOs;yNe z2;z>fLI%A`8LMVNy##JPez8OiRPMM_^4{U`*Am*i*Lmg@2LK`4Ul6BF&<+eR=><$C z0c#u88<(PYx}mZISATDgL7cF*26)?-I7$Xo9s}Yk7~oq?=)PM9>@6f8|?Lwoc{MU83f?+|PXP&S_*lhj5tpq8eN8 z$Ay|8@ewm#nFFbHjgDFG&SPZVzp)dJT3PEJf>&m{dW6)j9Ag<6+qVLGq%%qb%Lrbkxx0?vju%}K}R7Z$1AZpZYfIa4EEGMM=mQhNL>mMH z;DLx;=~-W+;KL_P2mM6iQ*Esm)zi}VZechdN^GvEsnsk$A)N&eH??P=3Ct6@U#`^` zwjQl6N*440C-fP?gp%|JIRlf(jHU@wk+mgPpO)Mv*$1oNSk;d><9In6l}1Mgok?F2 zlthj6SF~SpEx}$eUTyPioa;h=^rmjkT|$>WIt!T{$%yzl8j; zp+n`ExYyrLyyG7(QnHb$(0sNAuS)eq)~z>e)(7`J8&E>6Oy|Elj-cNnZSfx&1W3*maAO1JzwH14~`1x zEGjuf2N2WrD!6M*GTx_MwYLs)PF5Hvvfz{WJ0l_&igb*rSsda3i0jwhQocK2C#<%Pf7h>DXk!OCof8{4t6-oN%-;`C=63VJq`W z-96j#c6)1LRbRmmh`p67y0;u`ZzVp*usA{vN~mLY6$|(O7UxobVE(NAP}YdJG*Pyv zK+wEB;9)(yZAg@~@mQ0Ray~8%%Nz)k38zzifOVQ3%8i%GmeP9x zSeR!jh-u8JD>na^NCh8{!UwTS&$x5cD7S8|PF#+k+4c;@ zc@|Z#3nU-CZV2p05~5OCSm-xY2KTerB+H)*538aD0NHWZwGwtUANsinZ|pCP$~XrfMdL z0&=~*elSEZmNDQY9Vv;umWSM$w5Kr+u}49J5iKE9RgCR(NJ&+|Rw=7?$f#v0==GnZ#v+#Q{sV7B%6@E+ z=Oqam;MeC{PjE8p4`TI9Q@KOxCkSsn!QuWsG4`(lh@blX!to3u=pPkR!`E;2sJ1{} zMUHZ@=_GL|;S5dw)N20u?Pq~!*sA8%e^4@?QwBCcn;%N!w`{$IEq4z?%e3YfVs%s9 z!Fd}h>lDlrasphq55R(=!E#ZsQK|XF7GhbzTOVKd02(>}fty+18SU`_x~36}n!pul z`gX;O$D;hLa%Vcbdw!1xs{0uZ-{zJ}A}{IQ4=3mM63bbJqZ1pu_S{MZA7USNm8u!s zQ*>5?#$@!_*GQGYl+2x1vYl>%LO-->_uj#9DX%6^d0k7_j46GKNwV=(TjqD1`#ua` z;T3Ka0}%^?605u*PTLLs)?HnNTE31mI_$G;Ohy8iy;>${kJYODa1PSjD^QCKO`_D# z6HdfX#5bGv4B-?c)^+jZfQ0Om@$LSUTl@srAA0;Swhd`z#tRNQkR|v zojLDInh!9gPmjd@r+>HIWj4j6DSXMAtQa}1N~Cb8m#b`?Qg{!BN}jN~DDO|~SX*;q z0TVcn;!eovY-ZpZnd#M8?ZXJ-x?Nq_Hx>AAYeWx!=5gYi!hJ@!1`R4JylTS^(|A@j z0z@gizW38gecJYt*`nw&rntR$D1|gGp;z|Z%e!e%@ym4Pn9TQbE}M5R{$vM<`Zu2* zeUx!2UP=eA8OScf$tr+7pEmlzr7-c0IC4t^F&(WDWc=oy2^&@61+DLgx0aw3WcRnp zm-jhN&*a>c+=|@KTecqJ7rI;biAe|8GDPd?H69BVlTlsPsq*=p-~~cHS-czT7yt9Q zE)Qvpsq0h;u^DUDM|8-W&1Le)dfZSgp%AnqM!PBg@P8IgW@0N`Fzls-$-*smkk&C} zU$BN-QwDNYm#oZw+$EP*(Oot(>58>?ghi8bas~iJ4neD~bBo1|HsY~~U$@kGrj{mK zh~w|_a%7K1K*_txvKEw4k@#QRnO=IKGcYi>;l06fd|D!o$|hI#!%b0!Z8>oZVXCY6 z5i!Evovdw*)i+CuLFn>d7OV6p6*|FvFFyfAPxcfvOq~cVc#Oj%^@%zfa+Obhzb1)M zdEm{1=Vzu`XpP`AQwn*^f+O+L%bv420O&y&`@!KxgM7)02(zo7Vp_&b|A9ciKK-;l zOW}-ac}?b5&Ya3C&1n1y=~MsNM{we)Af`U^`?fW)VoDZi_rj3h_>$ziHrVb2X##u+t%M$X0mr;v0Cj0w3(NU|l8;0ds-DB*&t_NRsF${Ko3bqME?nKBP zZ67Nz(_{MVypGXfw8abwLuVaCX}3)UlxiGnL(R5f7_+Vg4fekXk+IQKehT`#qCqg8 z$&sQW^Sud0VRpXgp7UW^ejoL1J3#mjz5ajPEJH$W7n*cZ#lq_+vU|!pa}5r9f2awb z%FScENj-hM$HrrA%lBw*u!2+0x1VZv0C=fU)0Z7xHk~u9W%N1hBX@lzge4?d!D;7l zveo@z&_y79=(Sr%@p&+S%FEu4P%u+oK-ej5LUGEA`~SUZ!}<;~2YrLE_Ka7hry}EN zu2-Muzq1dE5>-vi_(|u}h$Yj)arhxsTwP)DbZ2j;`}<|ofwqe!`(P*-!T1mq;p{r^Ak0XZsLAnkvG4_X$mjpF!Nb{F4g` z$UCwQf_?5wHPn1oH==-n5fMq>-WMkRGntB#T#{J>1bY}W19s*FV|Wc^b(j_-|3I)POWKO#2l;KMG$p`Gm!;Kx2XCyt<5Mb(5yGgVA^GQn_B<9v@DC~ z6OV1E&fC(NX(T(+WT$lZ?-EAh9|y!6ubV*{;T^CDRvla2y;$$Z*GZlFWXRn@y)p5w zP1fl&r?q9#Go`3Pi+xxGwwF;;08NO@H=<>IA1-2Bv-hmeB8o@0QbjyQNfil4fMnj& z+FE>DEPrp9UDT3Z(N^ zXTp&Tf{4f77cQ6is;ZC*gD2QNnN7(M@cpL%l-FawMGS3PioW(bXn`p$2eiktjos+q z6xx44R?Q`!c5m?*L@9^TZ=d$~EK|+#O`&7{p7`f{z>7NJ$#fWpQ36vh^SdS3WQDUo z^LZ+=yQ1_9x?Bn^6NBxI*MWf!Rdwoi)oO)Q5so+e@Q>bgFOYvJlHd<$AmXL0tLez@ z*R1R)4_d`vmZBBpTNa=9m^oOfp?EQd^UB95{_Y-hBROL$q^r{5;x3boQ?p2aP|O^gau?n+kg*3;~8_hMQibyU02pI~sgX9*2fmXPj1;@ipVE=)3??2jDny zIW(2)#Dxe`sBL$6{#oLz@P)g+%xk%~_^1T|s5Ne`ZtL+f=KOnEI+5i9m literal 0 HcmV?d00001 diff --git a/edi_purchase_oca/static/description/index.html b/edi_purchase_oca/static/description/index.html new file mode 100644 index 000000000..b7baa690b --- /dev/null +++ b/edi_purchase_oca/static/description/index.html @@ -0,0 +1,430 @@ + + + + + + +EDI Purchase + + + +
    +

    EDI Purchase

    + + +

    Beta License: LGPL-3 OCA/edi Translate me on Weblate Try me on Runbot

    +

    This module intends to create a base to be extended by local edi rules +for purchase.

    +

    In order to add a new integration, you need to create a listener:

    +
    +class MyEventListener(Component):
    +    _name = "purchase.order.event.listener.demo"
    +    _inherit = "base.event.listener"
    +    _apply_on = ["purchase.order"]
    +
    +    def on_button_confirm_purchase_order(self, move):
    +        """Add your code here"""
    +
    +

    Table of contents

    + +
    +

    Bug Tracker

    +

    Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

    +

    Do not contact contributors directly about support or help with technical issues.

    +
    +
    +

    Credits

    +
    +

    Authors

    +
      +
    • ForgeFlow
    • +
    +
    + +
    +

    Maintainers

    +

    This module is maintained by the OCA.

    +Odoo Community Association +

    OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

    +

    This module is part of the OCA/edi project on GitHub.

    +

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    +
    +
    +
    + + diff --git a/edi_purchase_oca/views/edi_exchange_record_views.xml b/edi_purchase_oca/views/edi_exchange_record_views.xml new file mode 100644 index 000000000..0413585df --- /dev/null +++ b/edi_purchase_oca/views/edi_exchange_record_views.xml @@ -0,0 +1,30 @@ + + + + + + Purchase Order Exchange Record + ir.actions.act_window + edi.exchange.record + tree,form + [('model', '=', 'purchase.order')] + {} + + + + diff --git a/edi_purchase_oca/views/purchase_order_views.xml b/edi_purchase_oca/views/purchase_order_views.xml new file mode 100644 index 000000000..6e17a3a3e --- /dev/null +++ b/edi_purchase_oca/views/purchase_order_views.xml @@ -0,0 +1,28 @@ + + + + + purchase.order.form - edi_purchase_oca + purchase.order + + + + + + + + From 745046f547008e84af8941b14a2e36ba86fa6c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Alix?= Date: Wed, 6 Apr 2022 12:13:58 +0200 Subject: [PATCH 075/145] [MIG] edi_purchase_oca: Migration to 14.0 [UPD] Update edi_purchase_oca.pot [UPD] README.rst [UPD] Update edi_purchase_oca.pot [UPD] Update edi_purchase_oca.pot [UPD] Update edi_purchase_oca.pot [UPD] README.rst --- edi_purchase_oca/README.rst | 23 +++--- edi_purchase_oca/__manifest__.py | 4 +- edi_purchase_oca/i18n/edi_purchase_oca.pot | 72 ++++++++++++++++++- .../static/description/index.html | 50 ++++++------- 4 files changed, 112 insertions(+), 37 deletions(-) diff --git a/edi_purchase_oca/README.rst b/edi_purchase_oca/README.rst index d54839902..0c30581b7 100644 --- a/edi_purchase_oca/README.rst +++ b/edi_purchase_oca/README.rst @@ -2,10 +2,13 @@ EDI Purchase ============ -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:8ab40ab13f4a26ea0ba04ff19e53af88e490d1b2e783699454ae6255422e00c3 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -14,16 +17,16 @@ EDI Purchase :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github - :target: https://github.com/OCA/edi/tree/13.0/edi_purchase_oca + :target: https://github.com/OCA/edi/tree/14.0/edi_purchase_oca :alt: OCA/edi .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/edi-13-0/edi-13-0-edi_purchase_oca + :target: https://translation.odoo-community.org/projects/edi-14-0/edi-14-0-edi_purchase_oca :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/226/13.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/edi&target_branch=14.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module intends to create a base to be extended by local edi rules for purchase. @@ -50,8 +53,8 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -81,6 +84,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/edi `_ project on GitHub. +This module is part of the `OCA/edi `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/edi_purchase_oca/__manifest__.py b/edi_purchase_oca/__manifest__.py index c9ff3c686..be446cd40 100644 --- a/edi_purchase_oca/__manifest__.py +++ b/edi_purchase_oca/__manifest__.py @@ -5,11 +5,11 @@ "name": "EDI Purchase", "summary": """ Define EDI Configuration for Purchase Orders""", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "license": "LGPL-3", "author": "ForgeFlow, Odoo Community Association (OCA)", "website": "https://github.com/OCA/edi", - "depends": ["purchase", "edi", "component_event"], + "depends": ["purchase", "edi_oca", "component_event"], "data": ["views/purchase_order_views.xml", "views/edi_exchange_record_views.xml"], "demo": [], } diff --git a/edi_purchase_oca/i18n/edi_purchase_oca.pot b/edi_purchase_oca/i18n/edi_purchase_oca.pot index 872766122..3cf50cd17 100644 --- a/edi_purchase_oca/i18n/edi_purchase_oca.pot +++ b/edi_purchase_oca/i18n/edi_purchase_oca.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -18,11 +18,71 @@ msgstr "" msgid "EDI" msgstr "" +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__disable_edi_auto +msgid "Disable auto" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__display_name +msgid "Display Name" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_edi_endpoint_id +msgid "EDI origin endpoint" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_exchange_type_id +msgid "EDI origin exchange type" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_exchange_record_id +msgid "EDI origin record" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__origin_exchange_record_id +msgid "EDI record that originated this document." +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_config +msgid "Edi Config" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_has_form_config +msgid "Edi Has Form Config" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_record_ids +msgid "Exchange Record" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_record_count +msgid "Exchange Record Count" +msgstr "" + #. module: edi_purchase_oca #: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_root msgid "Exchange records" msgstr "" +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__id +msgid "ID" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order____last_update +msgid "Last Modified on" +msgstr "" + #. module: edi_purchase_oca #: model:ir.model,name:edi_purchase_oca.model_purchase_order msgid "Purchase Order" @@ -37,3 +97,13 @@ msgstr "" #: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_exchange_record msgid "Purchase Orders" msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__origin_edi_endpoint_id +msgid "Record generated via this endpoint" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__disable_edi_auto +msgid "When marked, EDI automatic processing will be avoided" +msgstr "" diff --git a/edi_purchase_oca/static/description/index.html b/edi_purchase_oca/static/description/index.html index b7baa690b..844cb4033 100644 --- a/edi_purchase_oca/static/description/index.html +++ b/edi_purchase_oca/static/description/index.html @@ -1,20 +1,20 @@ - + - + EDI Purchase - - -
    -

    EDI Purchase

    - - -

    Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

    -

    This module intends to create a base to be extended by local edi rules -for purchase.

    -

    In order to add a new integration, you need to create a listener:

    -
    -class MyEventListener(Component):
    -    _name = "purchase.order.event.listener.demo"
    -    _inherit = "base.event.listener"
    -    _apply_on = ["purchase.order"]
    -
    -    def on_button_confirm_purchase_order(self, move):
    -        """Add your code here"""
    -
    -

    Table of contents

    - -
    -

    Bug Tracker

    -

    Bugs are tracked on GitHub Issues. -In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

    -

    Do not contact contributors directly about support or help with technical issues.

    -
    -
    -

    Credits

    -
    -

    Authors

    -
      -
    • ForgeFlow
    • -
    -
    - -
    -

    Maintainers

    -

    This module is maintained by the OCA.

    -Odoo Community Association -

    OCA, or the Odoo Community Association, is a nonprofit organization whose -mission is to support the collaborative development of Odoo features and -promote its widespread use.

    -

    This module is part of the OCA/edi-framework project on GitHub.

    -

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    -
    -
    -
    - + + + + EDI Purchase + + + +
    +

    EDI Purchase

    + + +

    + + Beta + + + License: LGPL-3 + + + OCA/edi-framework + + + Translate me on Weblate + + + Try me on Runboat + +

    +

    This module intends to create a base to be extended by local edi rules + for purchase. +

    +

    In order to add a new integration, you need to create a listener:

    +
    +                class
    +                MyEventListener
    +                (
    +                Component
    +                ):
    +                
    +                
    +                _name
    +                =
    +                "purchase.order.event.listener.demo"
    +                
    +                
    +                _inherit
    +                =
    +                "base.event.listener"
    +                
    +                
    +                _apply_on
    +                =
    +                [
    +                "purchase.order"
    +                ]
    +                
    +
    +                
    +                def
    +                on_button_confirm_purchase_order
    +                (
    +                self
    +                ,
    +                move
    +                ):
    +                
    +                
    +                """Add your code here"""
    +            
    +

    + Table of contents +

    +
    + +
    +
    +

    + Bug Tracker +

    +

    Bugs are tracked on + GitHub Issues. + In case of trouble, please check there if your issue has already been reported. + If you spotted it first, help us to smash it by providing a detailed and welcomed + + feedback. +

    +

    Do not contact contributors directly about support or help with technical issues.

    +
    +
    +

    + Credits +

    +
    +

    + Authors +

    +
      +
    • ForgeFlow
    • +
    +
    +
    +

    + Contributors +

    + +
    +
    +

    + Maintainers +

    +

    This module is maintained by the OCA.

    + + Odoo Community Association + +

    OCA, or the Odoo Community Association, is a nonprofit organization whose + mission is to support the collaborative development of Odoo features and + promote its widespread use. +

    +

    This module is part of the + OCA/edi-framework + + project on GitHub. +

    +

    You are welcome to contribute. To learn how please visit + https://odoo-community.org/page/Contribute. +

    +
    +
    +
    + diff --git a/edi_purchase_oca/views/purchase_order_views.xml b/edi_purchase_oca/views/purchase_order_views.xml index 6e17a3a3e..b6d4c6799 100644 --- a/edi_purchase_oca/views/purchase_order_views.xml +++ b/edi_purchase_oca/views/purchase_order_views.xml @@ -7,12 +7,22 @@ purchase.order + + + + + + + + + + + + + + + + + diff --git a/edi_purchase_oca/views/res_partner_view.xml b/edi_purchase_oca/views/res_partner_view.xml index f950cc0d3..4985d326e 100644 --- a/edi_purchase_oca/views/res_partner_view.xml +++ b/edi_purchase_oca/views/res_partner_view.xml @@ -1,11 +1,10 @@ - res.partner.edi.purchase res.partner - + From a577be17eece5d27b5c707b0340c102f9c03fe51 Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Thu, 14 May 2026 15:09:52 +0200 Subject: [PATCH 085/145] [DOC] edi_purchase: update contributors --- edi_purchase_oca/readme/CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/edi_purchase_oca/readme/CONTRIBUTORS.md b/edi_purchase_oca/readme/CONTRIBUTORS.md index a18e9df0d..1ea50d1f7 100644 --- a/edi_purchase_oca/readme/CONTRIBUTORS.md +++ b/edi_purchase_oca/readme/CONTRIBUTORS.md @@ -1,3 +1,4 @@ * Lois Rilo * Simone Orsi * Phan Hong Phuc \<\> +* Maksym Yankin \ No newline at end of file From 9375a5ed88b77f13779ed217f03ad55c12ece3bb Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Wed, 20 May 2026 16:56:08 +0200 Subject: [PATCH 086/145] edi_purchase_oca: rework test setup --- edi_purchase_oca/tests/common.py | 13 ++----------- edi_purchase_oca/tests/test_generate.py | 2 +- edi_purchase_oca/tests/test_order.py | 11 ++++++++++- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/edi_purchase_oca/tests/common.py b/edi_purchase_oca/tests/common.py index 00f7f74e7..80d99c031 100644 --- a/edi_purchase_oca/tests/common.py +++ b/edi_purchase_oca/tests/common.py @@ -69,9 +69,9 @@ def _create_purchase_order(cls, **kw): return model.create(po_vals) @classmethod - def _setup_order(cls): + def _setup_order_records(cls): cls.vendor = cls.env["res.partner"].create( - {"name": "Azure Interior", "country_id": cls.env.company.country_id.id} + {"name": "ACME inc", "country_id": cls.env.company.country_id.id} ) cls.product = cls.env["product.product"].create( { @@ -80,12 +80,3 @@ def _setup_order(cls): "purchase_ok": True, } ) - return { - "order_line": [ - { - "product_id": cls.product.id, - "product_qty": 10, - "price_unit": 100.0, - } - ], - } diff --git a/edi_purchase_oca/tests/test_generate.py b/edi_purchase_oca/tests/test_generate.py index 1d10c3374..0f814b911 100644 --- a/edi_purchase_oca/tests/test_generate.py +++ b/edi_purchase_oca/tests/test_generate.py @@ -63,7 +63,7 @@ def setUpClass(cls): "snippet_do": cls._snippet_tpl.format(state="cancel"), } ) - cls._setup_order() + cls._setup_order_records() def test_new_order_no_conf_no_output(self): # No conf linked to the vendor -> no snippet executed. diff --git a/edi_purchase_oca/tests/test_order.py b/edi_purchase_oca/tests/test_order.py index 3285fa516..4fc5ad212 100644 --- a/edi_purchase_oca/tests/test_order.py +++ b/edi_purchase_oca/tests/test_order.py @@ -16,7 +16,16 @@ def setUpClass(cls): cls.exc_record_in = cls.backend.create_record( cls.exchange_type_in.code, {"edi_exchange_state": "input_received"} ) - order_vals = cls._setup_order() + cls._setup_order_records() + order_vals = { + "order_line": [ + { + "product_id": cls.product.id, + "product_qty": 10, + "price_unit": 100.0, + } + ], + } cls.order = cls._create_purchase_order( origin_exchange_record_id=cls.exc_record_in.id, **order_vals, From d1bb54e6f1c85ba50574d7a239f9a04db9732741 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Sun, 24 May 2026 15:45:48 +0000 Subject: [PATCH 087/145] [UPD] Update edi_purchase_oca.pot --- edi_purchase_oca/i18n/edi_purchase_oca.pot | 72 +++++++++++++++++----- 1 file changed, 58 insertions(+), 14 deletions(-) diff --git a/edi_purchase_oca/i18n/edi_purchase_oca.pot b/edi_purchase_oca/i18n/edi_purchase_oca.pot index 3cf50cd17..249b4e6aa 100644 --- a/edi_purchase_oca/i18n/edi_purchase_oca.pot +++ b/edi_purchase_oca/i18n/edi_purchase_oca.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -19,68 +19,110 @@ msgid "EDI" msgstr "" #. module: edi_purchase_oca -#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__disable_edi_auto +#: model:ir.model,name:edi_purchase_oca.model_res_partner +msgid "Contact" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_disable_auto +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__edi_disable_auto msgid "Disable auto" msgstr "" #. module: edi_purchase_oca -#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__display_name -msgid "Display Name" +#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form +msgid "Disable automated actions" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_root +#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form +msgid "EDI" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__edi_id +msgid "EDI ID" msgstr "" #. module: edi_purchase_oca #: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_edi_endpoint_id +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__origin_edi_endpoint_id msgid "EDI origin endpoint" msgstr "" #. module: edi_purchase_oca #: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_exchange_type_id +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__origin_exchange_type_id msgid "EDI origin exchange type" msgstr "" #. module: edi_purchase_oca #: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_exchange_record_id +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__origin_exchange_record_id msgid "EDI origin record" msgstr "" +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_res_partner__edi_purchase_conf_ids +#: model:ir.model.fields,field_description:edi_purchase_oca.field_res_users__edi_purchase_conf_ids +msgid "EDI purchase configuration" +msgstr "" + #. module: edi_purchase_oca #: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__origin_exchange_record_id +#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order_line__origin_exchange_record_id msgid "EDI record that originated this document." msgstr "" #. module: edi_purchase_oca #: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_config +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__edi_config msgid "Edi Config" msgstr "" +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__edi_exchange_ready +msgid "Edi Exchange Ready" +msgstr "" + #. module: edi_purchase_oca #: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_has_form_config +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__edi_has_form_config msgid "Edi Has Form Config" msgstr "" #. module: edi_purchase_oca #: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_record_ids +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__exchange_record_ids msgid "Exchange Record" msgstr "" #. module: edi_purchase_oca #: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_record_count +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__exchange_record_count msgid "Exchange Record Count" msgstr "" #. module: edi_purchase_oca -#: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_root -msgid "Exchange records" +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_related_record_ids +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__exchange_related_record_ids +msgid "Exchange Related Record" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_exchange_record +msgid "Exchanges" msgstr "" #. module: edi_purchase_oca -#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__id -msgid "ID" +#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order_line__edi_id +msgid "Internal or external identifier for records." msgstr "" #. module: edi_purchase_oca -#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order____last_update -msgid "Last Modified on" +#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.view_partner_form +msgid "Purchase" msgstr "" #. module: edi_purchase_oca @@ -90,20 +132,22 @@ msgstr "" #. module: edi_purchase_oca #: model:ir.actions.act_window,name:edi_purchase_oca.act_open_edi_exchange_record_purchase_order_view -msgid "Purchase Order Exchange Record" +msgid "Purchase Order Exchange Records" msgstr "" #. module: edi_purchase_oca -#: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_exchange_record -msgid "Purchase Orders" +#: model:ir.model,name:edi_purchase_oca.model_purchase_order_line +msgid "Purchase Order Line" msgstr "" #. module: edi_purchase_oca #: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__origin_edi_endpoint_id +#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order_line__origin_edi_endpoint_id msgid "Record generated via this endpoint" msgstr "" #. module: edi_purchase_oca -#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__disable_edi_auto +#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__edi_disable_auto +#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order_line__edi_disable_auto msgid "When marked, EDI automatic processing will be avoided" msgstr "" From 6f12a27dd1813e5bcc314009668acf0cfa783c7c Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Sun, 24 May 2026 15:52:45 +0000 Subject: [PATCH 088/145] [BOT] post-merge updates --- README.md | 1 + edi_purchase_oca/README.rst | 18 +++++++--- .../static/description/index.html | 33 ++++++++++++------- setup/_metapackage/pyproject.toml | 3 +- 4 files changed, 37 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 5e016a5ca..5406a0b2f 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ addon | version | maintainers | summary [edi_oca](edi_oca/) | 18.0.1.5.2 | simahawk etobella | Integrate all EDI modules together [edi_party_data_oca](edi_party_data_oca/) | 18.0.1.0.1 | simahawk | Allow to configure and retrieve party information for EDI exchanges. [edi_product_oca](edi_product_oca/) | 18.0.1.0.0 | | EDI framework configuration and base logic for products and products packaging +[edi_purchase_oca](edi_purchase_oca/) | 18.0.1.0.0 | | Define EDI Configuration for Purchase Orders [edi_queue_oca](edi_queue_oca/) | 18.0.1.0.2 | | Set Queue Jobs on EDI [edi_record_metadata_oca](edi_record_metadata_oca/) | 18.0.1.0.5 | simahawk | Allow to store metadata for related records. [edi_sale_endpoint](edi_sale_endpoint/) | 18.0.1.0.0 | simahawk | Glue module between edi_sale_oca and edi_endpoint_oca. diff --git a/edi_purchase_oca/README.rst b/edi_purchase_oca/README.rst index c86a88f7a..e35506069 100644 --- a/edi_purchase_oca/README.rst +++ b/edi_purchase_oca/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ============ EDI Purchase ============ @@ -7,13 +11,13 @@ EDI Purchase !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:8ab40ab13f4a26ea0ba04ff19e53af88e490d1b2e783699454ae6255422e00c3 + !! source digest: sha256:35895d0baca724ca82a2652ae75fb72231316d24ea998ba0cfeeb49648bcfa83 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi--framework-lightgray.png?logo=github @@ -28,8 +32,12 @@ EDI Purchase |badge1| |badge2| |badge3| |badge4| |badge5| -This module intends to create a base to be extended by local edi rules -for purchase. Assign the EDI Configuration on the partner form. +Handle purchase orders via EDI. + +This is a base module to plug purchase processes with the EDI framework. + +To handle inbound/outbound purchase orders, you need to create your own +integration modules on top of this base module. **Table of contents** @@ -60,8 +68,8 @@ Contributors - Lois Rilo lois.rilo@forgeflow.com - Simone Orsi simone.orsi@camptocamp.com - - Phan Hong Phuc +- Maksym Yankin maksym.yankin@camptocamp.com Maintainers ----------- diff --git a/edi_purchase_oca/static/description/index.html b/edi_purchase_oca/static/description/index.html index f8825ba72..228082825 100644 --- a/edi_purchase_oca/static/description/index.html +++ b/edi_purchase_oca/static/description/index.html @@ -3,7 +3,7 @@ -EDI Purchase +README.rst -
    -

    EDI Purchase

    +
    + + +Odoo Community Association + +
    +

    EDI Purchase

    -

    Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

    -

    This module intends to create a base to be extended by local edi rules -for purchase. Assign the EDI Configuration on the partner form.

    +

    Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

    +

    Handle purchase orders via EDI.

    +

    This is a base module to plug purchase processes with the EDI framework.

    +

    To handle inbound/outbound purchase orders, you need to create your own +integration modules on top of this base module.

    Table of contents

      @@ -385,7 +392,7 @@

      EDI Purchase

    -

    Bug Tracker

    +

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -393,24 +400,25 @@

    Bug Tracker

    Do not contact contributors directly about support or help with technical issues.

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • ForgeFlow
    • Camptocamp
    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association @@ -423,5 +431,6 @@

    Maintainers

    +
    diff --git a/setup/_metapackage/pyproject.toml b/setup/_metapackage/pyproject.toml index 988bd3ff5..abcb4d0a4 100644 --- a/setup/_metapackage/pyproject.toml +++ b/setup/_metapackage/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "odoo-addons-oca-edi-framework" -version = "18.0.20260514.0" +version = "18.0.20260524.0" dependencies = [ "odoo-addon-edi_account_core_oca==18.0.*", "odoo-addon-edi_account_oca==18.0.*", @@ -13,6 +13,7 @@ dependencies = [ "odoo-addon-edi_oca==18.0.*", "odoo-addon-edi_party_data_oca==18.0.*", "odoo-addon-edi_product_oca==18.0.*", + "odoo-addon-edi_purchase_oca==18.0.*", "odoo-addon-edi_queue_oca==18.0.*", "odoo-addon-edi_record_metadata_oca==18.0.*", "odoo-addon-edi_sale_endpoint==18.0.*", From d86d1f5854aac4f0fabd05f4ca3176de64757846 Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Mon, 25 May 2026 10:08:30 +0200 Subject: [PATCH 089/145] [COV] edi_core_oca: add test cov for conf lookup Ensure the conf and the env on the record is loaded properly when the handler is initialized. --- edi_core_oca/tests/test_backend_base.py | 66 +++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/edi_core_oca/tests/test_backend_base.py b/edi_core_oca/tests/test_backend_base.py index bb4bb322a..ab30fb873 100644 --- a/edi_core_oca/tests/test_backend_base.py +++ b/edi_core_oca/tests/test_backend_base.py @@ -11,6 +11,14 @@ class EDIBackendTestCaseBase(EDIBackendCommonTestCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.default_record = cls.backend.create_record( + "test_csv_input", + {"model": cls.partner._name, "res_id": cls.partner.id}, + ) + def setUp(self): super().setUp() self.loader = FakeModelLoader(self.env, self.__module__) @@ -92,3 +100,61 @@ def test_get_handler_no_handler(self): for action in ["receive", "input_validate", "process"]: with self.assertRaises(EDINotImplementedError): self.backend._get_exec_handler(record, action) + + # ---- conf / env_ctx resolution ------------------------------------------ + + def test_get_conf_for_record(self): + """`_get_conf_for_record` returns the action conf, or {} when missing.""" + self.exchange_type_in.advanced_settings_edit = ( + "execution_model:\n" + " receive:\n" + " env_ctx:\n" + " foo: bar\n" + " other_key: 1\n" + ) + record = self.default_record + # Action declared -> its conf + self.assertEqual( + self.backend._get_conf_for_record(record, "receive"), + {"env_ctx": {"foo": "bar"}, "other_key": 1}, + ) + # Action not declared -> empty + self.assertEqual(self.backend._get_conf_for_record(record, "process"), {}) + + def test_get_record_env_ctx(self): + """`_get_record_env_ctx` returns env_ctx for the action, else {}.""" + self.exchange_type_in.advanced_settings_edit = ( + "execution_model:\n" + " receive:\n" + " env_ctx:\n" + " foo: bar\n" + " flag: true\n" + " process:\n" + " other_key: 1\n" + ) + record = self.default_record + # Action with env_ctx -> mapping + self.assertEqual( + self.backend._get_record_env_ctx(record, "receive"), + {"foo": "bar", "flag": True}, + ) + # Action present but no env_ctx -> empty + self.assertEqual(self.backend._get_record_env_ctx(record, "process"), {}) + + def test_get_exec_handler_propagates_env_ctx(self): + """The handler returned by `_get_exec_handler` carries env_ctx keys.""" + self.exchange_type_in.advanced_settings_edit = ( + "execution_model:\n" + " receive:\n" + " env_ctx:\n" + " edi_test_marker: hello\n" + " edi_test_flag: true\n" + ) + record = self.default_record + handler = self.backend._get_exec_handler(record, "receive") + ctx = handler.__self__.env.context + self.assertEqual(ctx.get("edi_test_marker"), "hello") + self.assertEqual(ctx.get("edi_test_flag"), True) + # Action without env_ctx -> handler context not polluted + handler_proc = self.backend._get_exec_handler(record, "process") + self.assertNotIn("edi_test_marker", handler_proc.__self__.env.context) From de24b9522379263b05403f655f0e9798f934fbb7 Mon Sep 17 00:00:00 2001 From: mymage Date: Mon, 25 May 2026 19:48:53 +0000 Subject: [PATCH 090/145] Translated using Weblate (Italian) Currently translated at 100.0% (285 of 285 strings) Translation: edi-framework-18.0/edi-framework-18.0-edi_core_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_core_oca/it/ --- edi_core_oca/i18n/it.po | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/edi_core_oca/i18n/it.po b/edi_core_oca/i18n/it.po index 737c2dedc..3147d8f34 100644 --- a/edi_core_oca/i18n/it.po +++ b/edi_core_oca/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 17.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2026-04-30 10:45+0000\n" +"PO-Revision-Date: 2026-05-25 19:57+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -1102,7 +1102,7 @@ msgstr "Generatore" #. module: edi_core_oca #: model:ir.model.fields,field_description:edi_core_oca.field_edi_configuration__is_global msgid "Global Configuration" -msgstr "" +msgstr "Configurazione globale" #. module: edi_core_oca #: model_terms:ir.ui.view,arch_db:edi_core_oca.edi_exchange_record_view_search @@ -1181,6 +1181,8 @@ msgid "" "If checked, this configuration will be executed for all records, regardless " "of the partner relation." msgstr "" +"Se selezionata, questa configurazione verrà eseguita per tutti i record, " +"indipendentemente dalla relazione con il partner." #. module: edi_core_oca #: model:ir.model.fields,help:edi_core_oca.field_edi_exchange_type__exchange_filename_sequence_id From e03e10a3823c3d6a0dbd412db5c02b2b521b2246 Mon Sep 17 00:00:00 2001 From: mymage Date: Tue, 26 May 2026 06:17:22 +0000 Subject: [PATCH 091/145] Added translation using Weblate (Italian) --- edi_purchase_oca/i18n/it.po | 154 ++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 edi_purchase_oca/i18n/it.po diff --git a/edi_purchase_oca/i18n/it.po b/edi_purchase_oca/i18n/it.po new file mode 100644 index 000000000..dde2677a8 --- /dev/null +++ b/edi_purchase_oca/i18n/it.po @@ -0,0 +1,154 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * edi_purchase_oca +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: edi_purchase_oca +#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form +msgid "EDI" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model,name:edi_purchase_oca.model_res_partner +msgid "Contact" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_disable_auto +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__edi_disable_auto +msgid "Disable auto" +msgstr "" + +#. module: edi_purchase_oca +#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form +msgid "Disable automated actions" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_root +#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form +msgid "EDI" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__edi_id +msgid "EDI ID" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_edi_endpoint_id +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__origin_edi_endpoint_id +msgid "EDI origin endpoint" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_exchange_type_id +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__origin_exchange_type_id +msgid "EDI origin exchange type" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_exchange_record_id +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__origin_exchange_record_id +msgid "EDI origin record" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_res_partner__edi_purchase_conf_ids +#: model:ir.model.fields,field_description:edi_purchase_oca.field_res_users__edi_purchase_conf_ids +msgid "EDI purchase configuration" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__origin_exchange_record_id +#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order_line__origin_exchange_record_id +msgid "EDI record that originated this document." +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_config +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__edi_config +msgid "Edi Config" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__edi_exchange_ready +msgid "Edi Exchange Ready" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_has_form_config +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__edi_has_form_config +msgid "Edi Has Form Config" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_record_ids +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__exchange_record_ids +msgid "Exchange Record" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_record_count +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__exchange_record_count +msgid "Exchange Record Count" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_related_record_ids +#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order_line__exchange_related_record_ids +msgid "Exchange Related Record" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_exchange_record +msgid "Exchanges" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order_line__edi_id +msgid "Internal or external identifier for records." +msgstr "" + +#. module: edi_purchase_oca +#: model_terms:ir.ui.view,arch_db:edi_purchase_oca.view_partner_form +msgid "Purchase" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model,name:edi_purchase_oca.model_purchase_order +msgid "Purchase Order" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.actions.act_window,name:edi_purchase_oca.act_open_edi_exchange_record_purchase_order_view +msgid "Purchase Order Exchange Records" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model,name:edi_purchase_oca.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__origin_edi_endpoint_id +#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order_line__origin_edi_endpoint_id +msgid "Record generated via this endpoint" +msgstr "" + +#. module: edi_purchase_oca +#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__edi_disable_auto +#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order_line__edi_disable_auto +msgid "When marked, EDI automatic processing will be avoided" +msgstr "" From 6a3f1cba6e9d0afbac83994722cdf84a8b0fad39 Mon Sep 17 00:00:00 2001 From: mymage Date: Tue, 26 May 2026 06:42:37 +0000 Subject: [PATCH 092/145] Translated using Weblate (Italian) Currently translated at 100.0% (260 of 260 strings) Translation: edi-framework-18.0/edi-framework-18.0-edi_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_oca/it/ --- edi_oca/i18n/it.po | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/edi_oca/i18n/it.po b/edi_oca/i18n/it.po index d2cdce3ed..5295db47f 100644 --- a/edi_oca/i18n/it.po +++ b/edi_oca/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2026-04-30 10:45+0000\n" +"PO-Revision-Date: 2026-05-26 08:46+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -973,7 +973,7 @@ msgstr "Generatore" #. module: edi_oca #: model:ir.model.fields,field_description:edi_oca.field_edi_configuration__is_global msgid "Global Configuration" -msgstr "" +msgstr "Configurazione globale" #. module: edi_oca #: model_terms:ir.ui.view,arch_db:edi_oca.edi_exchange_record_view_search @@ -1052,6 +1052,8 @@ msgid "" "If checked, this configuration will be executed for all records, regardless " "of the partner relation." msgstr "" +"Se selezionata, questa configurazione verrà eseguita per tutti i record, " +"indipendentemente dalla relazione con il partner." #. module: edi_oca #: model:ir.model.fields,help:edi_oca.field_edi_exchange_type__exchange_filename_sequence_id From 047a3deba3a58224ea92e4ddf269042fb844a95d Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 27 May 2026 06:41:14 +0000 Subject: [PATCH 093/145] [BOT] post-merge updates --- README.md | 2 +- edi_storage_oca/README.rst | 2 +- edi_storage_oca/__manifest__.py | 2 +- edi_storage_oca/static/description/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5406a0b2f..663a553fd 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ addon | version | maintainers | summary [edi_sale_ubl_output_oca](edi_sale_ubl_output_oca/) | 18.0.1.0.1 | | Configuration and special behaviors for EDI on sales. [edi_state_oca](edi_state_oca/) | 18.0.1.0.3 | simahawk | Allow to assign specific EDI states to related records. [edi_stock_oca](edi_stock_oca/) | 18.0.1.0.1 | | Define EDI Configuration for Stock -[edi_storage_oca](edi_storage_oca/) | 18.0.1.0.2 | | Base module to allow exchanging files via storage backend (eg: SFTP). +[edi_storage_oca](edi_storage_oca/) | 18.0.1.0.3 | | Base module to allow exchanging files via storage backend (eg: SFTP). [edi_storage_queue_oca](edi_storage_queue_oca/) | 18.0.1.0.0 | | Integrates EDI Storage with Queue [edi_ubl_oca](edi_ubl_oca/) | 18.0.1.0.1 | simahawk | Define EDI backend type for UBL. [edi_webservice_oca](edi_webservice_oca/) | 18.0.1.0.2 | etobella simahawk | Defines webservice integration from EDI Exchange records diff --git a/edi_storage_oca/README.rst b/edi_storage_oca/README.rst index 52b9f7ece..ff34c4027 100644 --- a/edi_storage_oca/README.rst +++ b/edi_storage_oca/README.rst @@ -11,7 +11,7 @@ EDI Storage backend support !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:ae52c0238c8bab278e4e2d6a48d86d4222672b893df1f171be046f3b7a3c58ae + !! source digest: sha256:2511ea918ba213d754909a73c92b80e89a7ab320816acd446f9e2dcf26c538d0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/edi_storage_oca/__manifest__.py b/edi_storage_oca/__manifest__.py index 39f47e247..1f7b1d333 100644 --- a/edi_storage_oca/__manifest__.py +++ b/edi_storage_oca/__manifest__.py @@ -7,7 +7,7 @@ "summary": """ Base module to allow exchanging files via storage backend (eg: SFTP). """, - "version": "18.0.1.0.2", + "version": "18.0.1.0.3", "development_status": "Beta", "license": "LGPL-3", "website": "https://github.com/OCA/edi-framework", diff --git a/edi_storage_oca/static/description/index.html b/edi_storage_oca/static/description/index.html index 87b66f49d..9d7a9d130 100644 --- a/edi_storage_oca/static/description/index.html +++ b/edi_storage_oca/static/description/index.html @@ -372,7 +372,7 @@

    EDI Storage backend support

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:ae52c0238c8bab278e4e2d6a48d86d4222672b893df1f171be046f3b7a3c58ae +!! source digest: sha256:2511ea918ba213d754909a73c92b80e89a7ab320816acd446f9e2dcf26c538d0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

    Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

    Allow exchange files using storage backends from OCA/storage.

    From 872c28c15f7d93618e8f36e4b74bdf52e431f050 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Wed, 27 May 2026 06:49:48 +0000 Subject: [PATCH 094/145] [UPD] Update edi_storage_oca.pot --- edi_storage_oca/i18n/edi_storage_oca.pot | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/edi_storage_oca/i18n/edi_storage_oca.pot b/edi_storage_oca/i18n/edi_storage_oca.pot index cba90f769..7b3703040 100644 --- a/edi_storage_oca/i18n/edi_storage_oca.pot +++ b/edi_storage_oca/i18n/edi_storage_oca.pot @@ -114,6 +114,12 @@ msgstr "" msgid "Storage Handler for EDI" msgstr "" +#. module: edi_storage_oca +#. odoo-python +#: code:addons/edi_storage_oca/models/edi_oca_storage_handler.py:0 +msgid "Storage error while reading %(path)s: %(error)s" +msgstr "" + #. module: edi_storage_oca #: model:ir.model.fields,help:edi_storage_oca.field_edi_backend__storage_id msgid "Storage for in-out files" From 6b602a1d0fde6afdfea00066bac0370bc29c39f1 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 27 May 2026 06:56:45 +0000 Subject: [PATCH 095/145] [BOT] post-merge updates --- README.md | 2 +- edi_storage_oca/README.rst | 2 +- edi_storage_oca/__manifest__.py | 2 +- edi_storage_oca/static/description/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 663a553fd..8cb915bcf 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ addon | version | maintainers | summary [edi_sale_ubl_output_oca](edi_sale_ubl_output_oca/) | 18.0.1.0.1 | | Configuration and special behaviors for EDI on sales. [edi_state_oca](edi_state_oca/) | 18.0.1.0.3 | simahawk | Allow to assign specific EDI states to related records. [edi_stock_oca](edi_stock_oca/) | 18.0.1.0.1 | | Define EDI Configuration for Stock -[edi_storage_oca](edi_storage_oca/) | 18.0.1.0.3 | | Base module to allow exchanging files via storage backend (eg: SFTP). +[edi_storage_oca](edi_storage_oca/) | 18.0.1.0.4 | | Base module to allow exchanging files via storage backend (eg: SFTP). [edi_storage_queue_oca](edi_storage_queue_oca/) | 18.0.1.0.0 | | Integrates EDI Storage with Queue [edi_ubl_oca](edi_ubl_oca/) | 18.0.1.0.1 | simahawk | Define EDI backend type for UBL. [edi_webservice_oca](edi_webservice_oca/) | 18.0.1.0.2 | etobella simahawk | Defines webservice integration from EDI Exchange records diff --git a/edi_storage_oca/README.rst b/edi_storage_oca/README.rst index ff34c4027..f880503b3 100644 --- a/edi_storage_oca/README.rst +++ b/edi_storage_oca/README.rst @@ -11,7 +11,7 @@ EDI Storage backend support !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:2511ea918ba213d754909a73c92b80e89a7ab320816acd446f9e2dcf26c538d0 + !! source digest: sha256:ca9c4e0d1ecd9744b5cfa517900a5dace2a206007360ce2c1299dc1da5910bfa !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/edi_storage_oca/__manifest__.py b/edi_storage_oca/__manifest__.py index 1f7b1d333..87b4c5f92 100644 --- a/edi_storage_oca/__manifest__.py +++ b/edi_storage_oca/__manifest__.py @@ -7,7 +7,7 @@ "summary": """ Base module to allow exchanging files via storage backend (eg: SFTP). """, - "version": "18.0.1.0.3", + "version": "18.0.1.0.4", "development_status": "Beta", "license": "LGPL-3", "website": "https://github.com/OCA/edi-framework", diff --git a/edi_storage_oca/static/description/index.html b/edi_storage_oca/static/description/index.html index 9d7a9d130..fe56fe211 100644 --- a/edi_storage_oca/static/description/index.html +++ b/edi_storage_oca/static/description/index.html @@ -372,7 +372,7 @@

    EDI Storage backend support

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:2511ea918ba213d754909a73c92b80e89a7ab320816acd446f9e2dcf26c538d0 +!! source digest: sha256:ca9c4e0d1ecd9744b5cfa517900a5dace2a206007360ce2c1299dc1da5910bfa !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

    Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

    Allow exchange files using storage backends from OCA/storage.

    From 27ffba4ddd7ea98e590226477d5bd47f66b770cd Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 27 May 2026 06:56:55 +0000 Subject: [PATCH 096/145] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: edi-framework-18.0/edi-framework-18.0-edi_storage_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_storage_oca/ --- edi_storage_oca/i18n/it.po | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/edi_storage_oca/i18n/it.po b/edi_storage_oca/i18n/it.po index e35011ab4..ce7ead09f 100644 --- a/edi_storage_oca/i18n/it.po +++ b/edi_storage_oca/i18n/it.po @@ -28,7 +28,6 @@ msgstr "Tipo scambio EDI" #. module: edi_storage_oca #: model:ir.actions.server,name:edi_storage_oca.cron_check_storage_pending_input_ir_actions_server -#: model:ir.cron,cron_name:edi_storage_oca.cron_check_storage_pending_input msgid "EDI backend storage check pending input" msgstr "Controllo ingressi in attesa deposito backend EDI" @@ -51,8 +50,13 @@ msgstr "Deposito FS" #. module: edi_storage_oca #: model:ir.model.fields,help:edi_storage_oca.field_edi_exchange_type__exchange_filename_pattern msgid "" -"For output exchange types this should be a formatting string with the following variables available (to be used between brackets, `{}`): `exchange_record`, `record_name`, `type` and `dt`. For instance, a valid string would be {record_name}-{type.code}-{dt}\n" -"For input exchange types related to storage backends it should be a regex expression to filter the files to be fetched from the pending directory in the related storage. E.g: `.*my-type-[0-9]*.\\.csv`" +"For output exchange types this should be a formatting string with the " +"following variables available (to be used between brackets, `{}`): " +"`exchange_record`, `record_name`, `type` and `dt`. For instance, a valid " +"string would be {record_name}-{type.code}-{dt}\n" +"For input exchange types related to storage backends it should be a regex " +"expression to filter the files to be fetched from the pending directory in " +"the related storage. E.g: `.*my-type-[0-9]*.\\.csv`" msgstr "" "Per i tipi di scambio in uscita questo dovrebbe essere una stringa di " "formattazione con le seguenti variabili disponibili (da utilizzare tra " @@ -120,6 +124,17 @@ msgstr "Record creato da un file trovato nel deposito FS" msgid "Storage" msgstr "Deposito" +#. module: edi_storage_oca +#: model:ir.model,name:edi_storage_oca.model_edi_oca_storage_handler +msgid "Storage Handler for EDI" +msgstr "" + +#. module: edi_storage_oca +#. odoo-python +#: code:addons/edi_storage_oca/models/edi_oca_storage_handler.py:0 +msgid "Storage error while reading %(path)s: %(error)s" +msgstr "" + #. module: edi_storage_oca #: model:ir.model.fields,help:edi_storage_oca.field_edi_backend__storage_id msgid "Storage for in-out files" From 6f8ffbe08bebb36bee37c21dbc08e046ad585f5b Mon Sep 17 00:00:00 2001 From: Arnau Date: Tue, 19 May 2026 13:01:31 +0200 Subject: [PATCH 097/145] [IMP] edi_storage_oca: post-process input file via conf --- edi_storage_oca/__manifest__.py | 1 + edi_storage_oca/data/edi_configuration.xml | 29 +++++++ edi_storage_oca/models/edi_backend.py | 50 +++++++++++ edi_storage_oca/readme/CONFIGURE.md | 10 +++ edi_storage_oca/tests/__init__.py | 1 + edi_storage_oca/tests/test_event_listener.py | 88 ++++++++++++++++++++ edi_storage_oca/utils.py | 12 +++ 7 files changed, 191 insertions(+) create mode 100644 edi_storage_oca/data/edi_configuration.xml create mode 100644 edi_storage_oca/readme/CONFIGURE.md create mode 100644 edi_storage_oca/tests/test_event_listener.py diff --git a/edi_storage_oca/__manifest__.py b/edi_storage_oca/__manifest__.py index 39f47e247..1fac0f943 100644 --- a/edi_storage_oca/__manifest__.py +++ b/edi_storage_oca/__manifest__.py @@ -15,6 +15,7 @@ "depends": ["edi_core_oca", "fs_storage"], "data": [ "data/cron.xml", + "data/edi_configuration.xml", "security/ir_model_access.xml", "views/edi_backend_views.xml", ], diff --git a/edi_storage_oca/data/edi_configuration.xml b/edi_storage_oca/data/edi_configuration.xml new file mode 100644 index 000000000..53956f2eb --- /dev/null +++ b/edi_storage_oca/data/edi_configuration.xml @@ -0,0 +1,29 @@ + + + + + Storage: move input file to done + + + + record.backend_id._storage_on_edi_exchange_done(record) + + + + Storage: move input file to error + + + + record.backend_id._storage_on_edi_exchange_error(record) + + diff --git a/edi_storage_oca/models/edi_backend.py b/edi_storage_oca/models/edi_backend.py index e6767a789..a6d5b40fc 100644 --- a/edi_storage_oca/models/edi_backend.py +++ b/edi_storage_oca/models/edi_backend.py @@ -148,3 +148,53 @@ def _storage_new_exchange_record_vals(self, file_name): "edi_exchange_state": "input_pending", "storage_id": self.storage_id.id, } + + def _storage_on_edi_exchange_done(self, exchange_record): + """ + Move an input file from the pending dir to the done dir. + + Intended to be invoked from a global 'edi.configuration' snippet + bound to the 'on_edi_exchange_done' trigger. + """ + self.ensure_one() + storage = exchange_record.storage_id + if exchange_record.direction != "input" or not storage: + return False + if not self.input_dir_done: + return False + file_name = exchange_record.exchange_filename + pending_dir = exchange_record.type_id._storage_fullpath( + self.input_dir_pending + ).as_posix() + done_dir = exchange_record.type_id._storage_fullpath( + self.input_dir_done + ).as_posix() + error_dir = exchange_record.type_id._storage_fullpath( + self.input_dir_error + ).as_posix() + res = utils.move_file(storage, pending_dir, done_dir, file_name) + if not res and self.input_dir_error: + res = utils.move_file(storage, error_dir, done_dir, file_name) + return res + + def _storage_on_edi_exchange_error(self, exchange_record): + """ + Move an input file from the pending dir to the error dir. + + Intended to be invoked from a global 'edi.configuration' snippet + bound to the 'on_edi_exchange_error' trigger. + """ + self.ensure_one() + storage = exchange_record.storage_id + if exchange_record.direction != "input" or not storage: + return False + if not self.input_dir_error: + return False + file_name = exchange_record.exchange_filename + pending_dir = exchange_record.type_id._storage_fullpath( + self.input_dir_pending + ).as_posix() + error_dir = exchange_record.type_id._storage_fullpath( + self.input_dir_error + ).as_posix() + return utils.move_file(storage, pending_dir, error_dir, file_name) diff --git a/edi_storage_oca/readme/CONFIGURE.md b/edi_storage_oca/readme/CONFIGURE.md new file mode 100644 index 000000000..4050a7424 --- /dev/null +++ b/edi_storage_oca/readme/CONFIGURE.md @@ -0,0 +1,10 @@ +This module has two **inactive** global `edi.configuration` records +that move the input file across the storage directories on +`on_edi_exchange_done` / `on_edi_exchange_error`: + +- *Storage: move input file, pending → done (fallback error → done) +- *Storage: move input file, pending → error + +Before enabling them you **must** set `backend_id` on the record: +otherwise the global match runs against every backend in the database, +including non-storage ones. diff --git a/edi_storage_oca/tests/__init__.py b/edi_storage_oca/tests/__init__.py index 0a73fb8a1..54510bc1a 100644 --- a/edi_storage_oca/tests/__init__.py +++ b/edi_storage_oca/tests/__init__.py @@ -1,2 +1,3 @@ from . import test_edi_backend_storage +from . import test_event_listener from . import test_exchange_type diff --git a/edi_storage_oca/tests/test_event_listener.py b/edi_storage_oca/tests/test_event_listener.py new file mode 100644 index 000000000..af9be8741 --- /dev/null +++ b/edi_storage_oca/tests/test_event_listener.py @@ -0,0 +1,88 @@ +# Copyright 2020 ACSONE +# @author: Simone Orsi +# Copyright 2026 ForgeFlow S.L. (https://www.forgeflow.com) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +import base64 +from unittest import mock + +from odoo_test_helper import FakeModelLoader + +from odoo.addons.edi_core_oca.tests.common import EDIBackendCommonTestCase +from odoo.addons.edi_core_oca.tests.fake_models import EdiTestExecution + +STORAGE_MOVE_FILE_PATH = "odoo.addons.edi_storage_oca.utils.move_file" + + +class TestStorageEventListener(EDIBackendCommonTestCase): + @classmethod + def _get_backend(cls): + return cls.env.ref("edi_storage_oca.demo_edi_backend_storage") + + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.conf_done = cls.env.ref("edi_storage_oca.edi_conf_storage_move_on_done") + cls.conf_error = cls.env.ref("edi_storage_oca.edi_conf_storage_move_on_error") + (cls.conf_done | cls.conf_error).write( + {"active": True, "backend_id": cls.backend.id} + ) + + vals = { + "model": cls.partner._name, + "res_id": cls.partner.id, + "exchange_file": base64.b64encode(b"1234"), + "storage_id": cls.backend.storage_id.id, + } + cls.record = cls.backend.create_record("test_csv_input", vals) + + def setUp(self): + super().setUp() + self.loader = FakeModelLoader(self.env, self.__module__) + self.loader.backup_registry() + + self.loader.update_registry((EdiTestExecution,)) + fake_model = self.env["ir.model"].search( + [("model", "=", "edi.framework.test.execution")] + ) + self.exchange_type_in.process_model_id = fake_model + self.exchange_type_in.input_validate_model_id = fake_model + + def tearDown(self): + self.loader.restore_registry() + super().tearDown() + + def _patch_move_file(self): + return mock.patch(STORAGE_MOVE_FILE_PATH, autospec=True, return_value=True) + + def _expected_dir(self, raw_dir): + return self.exchange_type_in._storage_fullpath(raw_dir).as_posix() + + def test_01_process_record_success(self): + self.record.write({"edi_exchange_state": "input_received"}) + with self._patch_move_file() as mocked: + self.record.action_exchange_process() + mocked.assert_called_once() + storage, from_dir_str, to_dir_str, filename = mocked.call_args[0] + self.assertEqual(storage, self.backend.storage_id) + self.assertEqual( + from_dir_str, self._expected_dir(self.backend.input_dir_pending) + ) + self.assertEqual(to_dir_str, self._expected_dir(self.backend.input_dir_done)) + self.assertEqual(filename, self.record.exchange_filename) + + def test_02_process_record_with_error(self): + self.record.write({"edi_exchange_state": "input_received"}) + self.record._set_file_content("TEST %d" % self.record.id) + with self._patch_move_file() as mocked: + self.record.with_context( + test_break_process="OOPS! Something went wrong :(" + ).action_exchange_process() + mocked.assert_called_once() + storage, from_dir_str, to_dir_str, filename = mocked.call_args[0] + self.assertEqual(storage, self.backend.storage_id) + self.assertEqual( + from_dir_str, self._expected_dir(self.backend.input_dir_pending) + ) + self.assertEqual(to_dir_str, self._expected_dir(self.backend.input_dir_error)) + self.assertEqual(filename, self.record.exchange_filename) diff --git a/edi_storage_oca/utils.py b/edi_storage_oca/utils.py index 0b93e5da0..7ce442dca 100644 --- a/edi_storage_oca/utils.py +++ b/edi_storage_oca/utils.py @@ -2,8 +2,10 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl) import base64 +import functools import os import re +from pathlib import PurePath def add_file(storage, path, filedata, binary=False): @@ -58,3 +60,13 @@ def move_files(storage, files, destination_path, **kw): storage.fs.sep.join([destination_path, os.path.basename(file_path)]), **kw, ) + + +# TODO: drop this helper once https://github.com/OCA/storage/pull/606 is merged. +def move_file(storage, from_dir_str, to_dir_str, filename): + src = (PurePath(from_dir_str) / filename).as_posix() + if not storage.fs.exists(src): + return False + dst = (PurePath(to_dir_str) / filename).as_posix() + storage.env.cr.postcommit.add(functools.partial(storage.fs.move, src, dst)) + return True From 1289d7c6e064ffed80dbf34544d8068ff69487b0 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 28 May 2026 06:36:24 +0000 Subject: [PATCH 098/145] [BOT] post-merge updates --- README.md | 2 +- edi_core_oca/README.rst | 2 +- edi_core_oca/__manifest__.py | 2 +- edi_core_oca/static/description/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8cb915bcf..864ed7cfc 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ addon | version | maintainers | summary [edi_account_core_oca](edi_account_core_oca/) | 18.0.1.1.1 | etobella | Define EDI Configuration for Account Moves [edi_account_oca](edi_account_oca/) | 18.0.1.1.1 | etobella | Define some component listeners for Account Moves [edi_component_oca](edi_component_oca/) | 18.0.1.1.0 | simahawk etobella | Allow to use Connector as a source in EDI -[edi_core_oca](edi_core_oca/) | 18.0.1.7.0 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. +[edi_core_oca](edi_core_oca/) | 18.0.1.7.1 | simahawk etobella | Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. [edi_endpoint_oca](edi_endpoint_oca/) | 18.0.1.0.3 | | Base module allowing configuration of custom endpoints for EDI framework. [edi_exchange_template_oca](edi_exchange_template_oca/) | 18.0.1.3.3 | simahawk | Allows definition of exchanges via templates. [edi_exchange_template_party_data](edi_exchange_template_party_data/) | 18.0.1.0.1 | simahawk | Glue module between edi_exchange_template and edi_party_data diff --git a/edi_core_oca/README.rst b/edi_core_oca/README.rst index 55bdc1e55..67548dee5 100644 --- a/edi_core_oca/README.rst +++ b/edi_core_oca/README.rst @@ -11,7 +11,7 @@ EDI !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:27258fb23153f2660be19d7c76b04c4d09d35d1e240b779076c7f4a9fa66d9f2 + !! source digest: sha256:aa0c40a082ced3e5e5d376f0eaf4c3a4487421a5abc4c22a81665a279bddaad1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/edi_core_oca/__manifest__.py b/edi_core_oca/__manifest__.py index c3a09f07b..2ddb96481 100644 --- a/edi_core_oca/__manifest__.py +++ b/edi_core_oca/__manifest__.py @@ -9,7 +9,7 @@ Define backends, exchange types, exchange records, basic automation and views for handling EDI exchanges. """, - "version": "18.0.1.7.0", + "version": "18.0.1.7.1", "website": "https://github.com/OCA/edi-framework", "development_status": "Beta", "license": "LGPL-3", diff --git a/edi_core_oca/static/description/index.html b/edi_core_oca/static/description/index.html index de6475a29..295dbf5ea 100644 --- a/edi_core_oca/static/description/index.html +++ b/edi_core_oca/static/description/index.html @@ -372,7 +372,7 @@

    EDI

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:27258fb23153f2660be19d7c76b04c4d09d35d1e240b779076c7f4a9fa66d9f2 +!! source digest: sha256:aa0c40a082ced3e5e5d376f0eaf4c3a4487421a5abc4c22a81665a279bddaad1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

    Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

    Base EDI backend.

    From 19420f5ba07df22ca0487007f38b3a350656e20f Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Thu, 28 May 2026 08:57:15 +0200 Subject: [PATCH 099/145] [IMP] edi_core_oca: type add action_view_exchange_records You can finally jump from a type to its existing records. --- edi_core_oca/models/edi_exchange_type.py | 32 ++++++++++++++++ edi_core_oca/tests/test_exchange_type.py | 37 +++++++++++++++++++ .../views/edi_exchange_type_views.xml | 14 +++++++ 3 files changed, 83 insertions(+) diff --git a/edi_core_oca/models/edi_exchange_type.py b/edi_core_oca/models/edi_exchange_type.py index 5850cf356..3346e487f 100644 --- a/edi_core_oca/models/edi_exchange_type.py +++ b/edi_core_oca/models/edi_exchange_type.py @@ -147,6 +147,14 @@ class EDIExchangeType(models.Model): """, ) advanced_settings = Serialized(default={}, compute="_compute_advanced_settings") + exchange_record_ids = fields.One2many( + comodel_name="edi.exchange.record", + inverse_name="type_id", + ) + exchange_record_count = fields.Integer( + string="# Exchange Records", + compute="_compute_exchange_record_count", + ) rule_ids = fields.One2many( comodel_name="edi.exchange.type.rule", inverse_name="type_id", @@ -240,6 +248,17 @@ def _compute_ack_for_type_ids(self): for rec in self: rec.ack_for_type_ids = [x.id for x in by_type_id.get(rec.id, [])] + @api.depends("exchange_record_ids") + def _compute_exchange_record_count(self): + data = self.env["edi.exchange.record"]._read_group( + [("type_id", "in", self.ids)], + groupby=["type_id"], + aggregates=["__count"], + ) + mapped_data = {type_.id: count for type_, count in data} + for rec in self: + rec.exchange_record_count = mapped_data.get(rec.id, 0) + def get_settings(self): return self.advanced_settings @@ -331,3 +350,16 @@ def copy_data(self, default=None): default = dict(default or {}) default.setdefault("code", f"{self.code}/COPY_FIXME") return super().copy_data(default=default) + + def action_view_exchange_records(self): + self.ensure_one() + action = self.env["ir.actions.act_window"]._for_xml_id( + "edi_core_oca.act_open_edi_exchange_record_view" + ) + action["domain"] = [("type_id", "=", self.id)] + action["context"] = { + "default_type_id": self.id, + "default_backend_id": self.backend_id.id, + "search_default_type_id": self.id, + } + return action diff --git a/edi_core_oca/tests/test_exchange_type.py b/edi_core_oca/tests/test_exchange_type.py index 6edfd79c6..5d3ae33bb 100644 --- a/edi_core_oca/tests/test_exchange_type.py +++ b/edi_core_oca/tests/test_exchange_type.py @@ -167,3 +167,40 @@ def test_archive_rules(self): rule2.invalidate_recordset() self.assertFalse(rule1.active) self.assertFalse(rule2.active) + + def _create_exchange_record(self, exc_type): + return self.backend.create_record( + exc_type.code, + {"model": self.partner._name, "res_id": self.partner.id}, + ) + + def test_exchange_record_count(self): + exc_type = self.exchange_type_out + self.assertEqual(exc_type.exchange_record_count, 0) + rec1 = self._create_exchange_record(exc_type) + rec2 = self._create_exchange_record(exc_type) + # Record on a different type must not be counted + self._create_exchange_record(self.exchange_type_in) + self.assertEqual(exc_type.exchange_record_count, 2) + self.assertEqual(set(exc_type.exchange_record_ids.ids), {rec1.id, rec2.id}) + + def test_action_view_exchange_records(self): + exc_type = self.exchange_type_out + rec = self._create_exchange_record(exc_type) + action = exc_type.action_view_exchange_records() + self.assertEqual(action["type"], "ir.actions.act_window") + self.assertEqual(action["res_model"], "edi.exchange.record") + self.assertIn(("type_id", "=", exc_type.id), action["domain"]) + ctx = action["context"] + self.assertEqual(ctx.get("default_type_id"), exc_type.id) + self.assertEqual(ctx.get("default_backend_id"), exc_type.backend_id.id) + self.assertEqual(ctx.get("search_default_type_id"), exc_type.id) + # The action's domain must actually match the created exchange record + records = self.env[action["res_model"]].search(action["domain"]) + self.assertIn(rec, records) + + def test_action_view_exchange_records_requires_singleton(self): + with self.assertRaises(ValueError): + ( + self.exchange_type_out | self.exchange_type_in + ).action_view_exchange_records() diff --git a/edi_core_oca/views/edi_exchange_type_views.xml b/edi_core_oca/views/edi_exchange_type_views.xml index 244019da9..cddc4a36b 100644 --- a/edi_core_oca/views/edi_exchange_type_views.xml +++ b/edi_core_oca/views/edi_exchange_type_views.xml @@ -26,6 +26,20 @@ bg_color="bg-danger" invisible="active" /> +
    + +