edi_exchange_template_oca
Provide EDI exchange templates to control input/output records contents.
Key Features
- edi.exchange.template.output: Defines reusable EDI output templates that can emit XML, JSON, or report payloads via QWeb views, JSON generators, or ir.actions.report with optional XML prettifying.
- edi.exchange.template.mixin: Shares naming, backend/type linkage, and safe_eval code snippets with time utilities so each template can extend the generation context.
- edi.exchange.template.output: Builds the render context with the exchange record, backend, helper methods to call nested templates, and optional info dictionaries before executing the generator.
- edi.exchange.template.output: Validates JSON generators by requiring code snippets to set a result['payload'] dict and serializes that payload when producing the message.
- edi.exchange.type: Lets each exchange type assign a default output template and enforces that restricted templates cannot be used by unauthorized types.
- edi.backend: Resolves which template to use by preferring the type-specific choice and otherwise finding backend-type-compatible templates prioritized by explicit allowed type matches.
- edi.oca.template.handler: Provides an exchange handler that runs the backend-selected template to generate data and raises an EDI error if no template exists.
- info providers: Allows templates to request backend components based on model and usage code to fetch additional data during rendering.
- xml processing: Removes helper nswrapper elements after rendering so modular QWeb snippets can declare namespaces without polluting the final XML.