From b42ba0aea8c9e1891832dc9e79a4a71a0a8b06fe Mon Sep 17 00:00:00 2001 From: Ricardoalso Date: Mon, 23 Feb 2026 09:53:48 +0100 Subject: [PATCH 01/52] [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 02/52] [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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ryX_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 03/52] [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 04/52] [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 05/52] 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 06/52] [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 07/52] 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 08/52] 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 09/52] [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 10/52] [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: Mon, 25 Mar 2024 12:19:40 +0700 Subject: [PATCH 11/52] [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~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KZqsJYT(#@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 12/52] [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 13/52] [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 14/52] 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 15/52] 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 16/52] [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 17/52] [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 6b4355ae166bd2ace76326ffa92bfb307d01d96c Mon Sep 17 00:00:00 2001 From: oca-ci Date: Wed, 6 May 2026 08:49:27 +0000 Subject: [PATCH 18/52] [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 19/52] [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 893a853674ddad8534792b1970d5e4260f80ecab Mon Sep 17 00:00:00 2001 From: oca-ci Date: Thu, 14 May 2026 09:53:07 +0000 Subject: [PATCH 20/52] [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 21/52] [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 22/52] [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 23/52] [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 24/52] [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 25/52] [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 26/52] [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 27/52] [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 28/52] [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 29/52] [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 30/52] 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 31/52] 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 32/52] [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 33/52] [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 34/52] 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 35/52] [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 36/52] [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 37/52] [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 38/52] 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 39/52] 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 40/52] [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{MU83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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 41/52] [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 51/52] [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 52/52] 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,