From 773bcc0d5b05c16dbc10692e85751931164a74d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miquel=20Ra=C3=AFch?= Date: Fri, 17 Jul 2026 12:34:49 +0200 Subject: [PATCH] [FIX] edi_core_oca: add no-op handler to fix demo data Output/input demo exchange types in edi_purchase_oca, edi_sale_oca and edi_endpoint_oca violated the new _check_direction_handlers constraint, breaking installation with demo data. Add a no-op handler in edi_core_oca and reference it from those demo records. --- edi_core_oca/models/edi_oca_handler.py | 23 ++++++++++++++++++++++ edi_endpoint_oca/demo/edi_backend_demo.xml | 1 + 2 files changed, 24 insertions(+) diff --git a/edi_core_oca/models/edi_oca_handler.py b/edi_core_oca/models/edi_oca_handler.py index 2406d5154..723d776e3 100644 --- a/edi_core_oca/models/edi_oca_handler.py +++ b/edi_core_oca/models/edi_oca_handler.py @@ -59,3 +59,26 @@ class EdiOcaHandlerCheck(models.AbstractModel): def check(self, exchange_record): pass + + +class EdiOcaHandlerNoop(models.AbstractModel): + """No-op implementation of every EDI handler role. + + ``edi.exchange.type`` requires handlers matching its direction (see + ``_check_direction_handlers``) but ``edi_core_oca`` ships no concrete + implementation. This handler performs no action and can be referenced by + demo/showcase exchange types, or used as a placeholder until a real + handler is configured. + """ + + _name = "edi.oca.handler.noop" + _inherit = [ + "edi.oca.handler.generate", + "edi.oca.handler.input.validate", + "edi.oca.handler.output.validate", + "edi.oca.handler.send", + "edi.oca.handler.receive", + "edi.oca.handler.process", + "edi.oca.handler.check", + ] + _description = "EDI OCA Handler No-op" diff --git a/edi_endpoint_oca/demo/edi_backend_demo.xml b/edi_endpoint_oca/demo/edi_backend_demo.xml index cea2db0e8..02384ef0c 100644 --- a/edi_endpoint_oca/demo/edi_backend_demo.xml +++ b/edi_endpoint_oca/demo/edi_backend_demo.xml @@ -10,6 +10,7 @@ demo_endpoint input +