diff --git a/edi_purchase_oca/__init__.py b/edi_purchase_oca/__init__.py
index 0650744f6bc..0f00a6730df 100644
--- a/edi_purchase_oca/__init__.py
+++ b/edi_purchase_oca/__init__.py
@@ -1 +1,2 @@
from . import models
+from . import components
diff --git a/edi_purchase_oca/__manifest__.py b/edi_purchase_oca/__manifest__.py
index be446cd4047..46c835cab47 100644
--- a/edi_purchase_oca/__manifest__.py
+++ b/edi_purchase_oca/__manifest__.py
@@ -10,6 +10,11 @@
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/edi",
"depends": ["purchase", "edi_oca", "component_event"],
- "data": ["views/purchase_order_views.xml", "views/edi_exchange_record_views.xml"],
+ "data": [
+ "views/purchase_order_views.xml",
+ "views/edi_exchange_record_views.xml",
+ "views/res_partner_view.xml",
+ "data/edi_configuration.xml",
+ ],
"demo": [],
}
diff --git a/edi_purchase_oca/components/__init__.py b/edi_purchase_oca/components/__init__.py
new file mode 100644
index 00000000000..3d4a3c96a27
--- /dev/null
+++ b/edi_purchase_oca/components/__init__.py
@@ -0,0 +1 @@
+from . import listener_purchase_order
diff --git a/edi_purchase_oca/components/listener_purchase_order.py b/edi_purchase_oca/components/listener_purchase_order.py
new file mode 100644
index 00000000000..d8a6b28d44d
--- /dev/null
+++ b/edi_purchase_oca/components/listener_purchase_order.py
@@ -0,0 +1,16 @@
+# Copyright 2024 Camptocamp SA
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo.addons.component.core import Component
+
+
+class EDIConfigPurchaseListener(Component):
+ _name = "edi.listener.config.purchase.order"
+ _inherit = "base.event.listener"
+ _apply_on = ["purchase.order"]
+
+ def on_button_confirm_purchase_order(self, record):
+ trigger = "on_button_confirm_purchase_order"
+ confs = record.mapped("partner_id.edi_purchase_conf_ids").edi_get_conf(trigger)
+ for conf in confs:
+ conf.edi_exec_snippet_do(record)
diff --git a/edi_purchase_oca/data/edi_configuration.xml b/edi_purchase_oca/data/edi_configuration.xml
index 68cb404eab6..00ee49a68b8 100644
--- a/edi_purchase_oca/data/edi_configuration.xml
+++ b/edi_purchase_oca/data/edi_configuration.xml
@@ -6,14 +6,14 @@
on_button_confirm_purchase_order
- result={
- "snippet_var_do": {}
- }
+result={
+ "snippet_var_do": {}
+}
- Send EDI Quoctation Config
+ Send EDI Quotation Config
send_via_email_rfq
send_via_email_rfq
+
res.partner.form.inherit.sales_purchases
res.partner
-
-
-
-
+
+
+
+
+
+