PMIS Federation Exchange
Shared business-document contracts and native commercial calculations for Odoo 18 Community. Exchange builds on Core identities and Transport without requiring account provisioning, shared login, messaging, or Matrix.
Features
Versioned structured RFQ, quotation, and purchase/sales order validation.
Posted invoice and credit-note contracts with signed correction lines, original-document links, frozen PDF metadata, and source total checks.
Validated shipment and customer-return contracts with actual quantities, order-line links, original delivery/move references, and backorder evidence.
Explicit cancellation and replacement notices with separate document identities.
Safe received, pending-review, applied, and rejected acknowledgment schemas.
Native Odoo tax-exclusive extraction and local tax-inclusive pricing that preserve quoted untaxed amounts and discounts.
Approved unit conversion calculations that adjust quantity and price together.
Receiver-owned routing approvals for exact instance pairs, operating companies, counterparties, and document capabilities, with verified sender memberships.
Approved product-variant, unit, and packaging mappings scoped to each route.
Permanent approval evidence and archived originals for reviewed replacements.
Immutable incoming snapshots with exact replay and document-revision protection.
Frozen reviewed party, sender, native partner, and address bindings.
Append-only received, review, and terminal receipt evidence with bounded reverse-direction acknowledgment envelopes.
Explicit receiver verification approval with permanent attributed review history.
Authenticated document channels bound to exact reviewed routes and service principals.
Durable sender-owned snapshots, bounded retries, and read-only receipt reconciliation.
Frozen attachment bytes with company, MIME, size, and digest checks.
Automatic invoice PDF freezing and explicitly selected supporting attachments.
Native source pricing and receiver commercial preparation with local taxes.
Permanent operating-company-scoped native order, line, product, unit, category, and packaging references, with bounded native order serialization.
Access and dependencies
Install pmis_federation_exchange. Its dependencies are pmis_federation_transport, account, and uom. No additional Python packages or external OCA addons are required.
Calculations require an explicitly accessible operating company and native local records. The pricing service exposes private adapter methods, not generic RPC actions. Administrators maintain approvals through Federation > Document Routes and Document Mappings. Incoming and outgoing document menus are restricted to administrators; installation does not grant access to native business documents.
Adapter usage
Receiver verification review
Open Federation > Incoming Documents to inspect an immutable snapshot and its original verification. Review Verification opens an explicit approval dialog requiring review evidence. Approval records the acting administrator, time, and current verification separately from the original journal.
Only the original reviewed route can authorize the operation. A replacement route cannot retarget historical documents. A revision requires its exact applied predecessor; missing declared dependencies or untransferred files block approval. Changed verification requires another explicit review. Applied and rejected operations cannot be approved again. Verification also retains the approved commercial mapping IDs and native targets; replacing a partner, product, unit, or packaging approval invalidates earlier review.
Verification approval alone does not create, confirm, or post a native document. Native adapters call _check_application_review before applying reviewed operations; that check revalidates current proof and all dependencies. Native document creation remains the responsibility of the installed native adapter.
Contract services
Adapters call document_protocol.validate_document_envelope for bounded account-independent snapshots, and the private pmis.federation.exchange.pricing service for native calculations. The lifecycle contract and order contract describe the exact structures and receiver obligations.
Receiver routing
Administrators create pmis.federation.exchange.route approvals with an explicit operating company, local and remote Core instances, a verified local Operating Company mapping, reviewed remote organization correspondence, the remote company's verified mapping UUID, and a document capability. Directory ownership remains separate from the operating destination. An optional verified organization contact mapping selects the native counterpart partner; without it, partner review remains unresolved.
An adapter calls the route model's private _resolve method with a validated document envelope and the local instance, remote instance, and capability established by its authenticated channel. The method returns the exact approved route and envelope digest. It rechecks live verification and the sender's approved Core organization/instance membership. UUID claims, names, shared partners, and the currently selected company never provide fallback routing. The method does not authenticate the channel itself.
Administrators create pmis.federation.exchange.mapping approvals against a route, source UUID, and one native partner, product variant, unit, or packaging target. Its private _resolve returns an approved native target or an empty recordset for an unresolved reference. Archived targets and foreign-company products require review. A packaging approval cannot itself authorize unit conversion. Taxes always use local settings. The mapping service's private _convert_units resolves approved native source-unit equivalence before calling the pricing helper. An unresolved source unit returns None so the adapter can retain original productless draft values for review.
Approval targets and attribution remain permanent. To correct a route or mapping, archive it and create an explicitly reviewed replacement. Archived records retain their original targets; new use revalidates current authority. Adapters must retain the original approval references with their immutable delivery snapshots.
Incoming operation journal
An authenticated adapter calls the private pmis.federation.exchange.snapshot._receive_envelope method with its independently established instance pair and capability. Recording persists canonical document bytes, the complete digest, company and route ownership, and received/review receipts in one transaction. The caller owns the transaction commit. Recording itself does not authenticate a channel or apply native business changes.
Retries reuse the exact original operation and snapshot. Reusing an operation UUID with different content, assigning another operation to the same document revision, or moving document ownership between revisions is rejected. Missing predecessors, inconsistent revision chains, unresolved dependencies, and changed verification remain in review. Exact applied snapshot evidence and stable line UUIDs identify declared dependencies; native counterpart correspondence is an adapter responsibility.
The journal retains document-time parties, addresses, and links even when local records change. Reviewed route replacements do not take over historical snapshots. Missing address correspondence is retained for review; later verification cannot silently approve that original delivery. Frozen file bytes are transferred separately under the original authenticated channel. Snapshots remain in dependency review until every declared file has passed the exact content checks.
pmis.federation.exchange.receipt keeps each lifecycle observation immutable. Repeated observations reuse the same receipt, changes append new evidence, and terminal outcomes cannot be replaced. Its private _acknowledgment method returns the exact v1 status envelope without native IDs or business-state details. An applied receipt requires an installed native adapter's application hook; the library provides no application implementation. Authenticated delivery and receipt lookup return the latest exact acknowledgment without applying a native document.
Commercial safeguards
Each calculation uses an explicit accessible operating company, active quoted currency, and native local taxes. Sender taxes remain evidence. The service never activates currencies, converts currencies, or maps sender tax IDs. Calculations that cannot preserve the quoted untaxed amount require review.
The unit conversion helper requires an adapter's explicit approval for different units in the same native category and changes quantity and price together without quantity rounding. It does not create approved mappings or infer conversions from names, packaging descriptions, or source UUIDs.
Approved native targets
Partners can be selected or explicitly created in Document Mappings using the verified counterparty UUID. This resolves a missing partner on the original route; the held document requires fresh verification review before application. Product variant targets can likewise be selected or explicitly created. Names and codes are selection aids, never authorization or automatic matching keys.
Authenticated channels and sending
In Federation > Connections, select a document capability and its reviewed Document Route. Delegate exactly the route's local and counterparty organizations. The connection's Directory Owner is distinct from the route's Operating Company. An incoming connection requires a dedicated Transport service principal with both companies enabled. Scoped federation API keys and the existing runtime binding authorize HTTPS requests; installing Exchange does not configure credentials or trust.
The operations endpoint journals documents and returns a bounded reverse-direction status envelope. The receipts endpoint returns the latest exact observation without replaying application. Replacing a route cannot retarget a historical delivery. Discovery advertises only the principal's reviewed document capability; unsupported native application stays in receiver review.
Native sender adapters call pmis.federation.exchange.outgoing._enqueue_envelope with their native source and explicitly selected attachments. The workflow checks native read access, operating company, source model/state, the acting user's verified Core identity and approved membership, and the exact outgoing party claims. Invoice and credit-note PDFs are rendered automatically and frozen in the same transaction. Supporting files must be selected explicitly from readable binary attachments of that source. Order snapshots may carry optional supporting attachment metadata.
Federation > Outgoing Documents shows frozen revisions and remote receipt history. Scheduled dispatch retries uncertain delivery with the original bytes and operation UUID, stopping for review after eight attempts. Retry Delivery requires current verification; Reconcile Receipt retrieves exact remote status without another business delivery. Acknowledgments contain no native IDs or private diagnostics.
The binary transfer endpoint accepts only declared files for the authenticated channel's original journal operation. Each file is bounded to 5 MiB, with at most ten files and 10 MiB combined per snapshot. PDF, PNG, and JPEG signatures, sizes, and SHA-256 digests must match. Frozen bytes remain separate from native chatter and cannot be replaced. Receiver verification requires every declared file to be present.
Native commercial adapter inputs
pmis.federation.exchange.adapter._source_pricing extracts native order/accounting line prices and original tax evidence. _receiver_lines prepares order inputs using approved route mappings, the unchanged active quotation currency, native fiscal positions and local product taxes. Approved unit conversion adjusts price and quantity together. Missing products, units, incompatible packaging, or unrepresentable amounts retain the original priced productless line and explicit review reasons. Buyer-led unquoted requests never promote buyer evidence to authoritative seller prices.
The adapter interface prepares inputs; pmis_federation_order owns draft creation, stable counterpart document/line correspondence, explicit Send, revision differences, and atomic acceptance. Stock and accounting adapters add their own scoped native target mappings.
_source_order prepares eligible native RFQs, quotations, and confirmed orders with stable sender-owned document and line UUIDs. Product variants, units, unit categories, and packaging retain permanent references within each operating company. Native edits reuse those references; new lines receive new identities. Source access and company ownership are checked before allocation. References remain immutable even if a native source is later removed.
Commercial lines retain their native sequence; sections and notes are excluded from the initial order contract. Positive quantities, bounded descriptions, active units, and packaging expressed in the source line unit are required. Seller prices use native tax-exclusive calculations; buyer amounts stay source evidence until the order adapter proves an exact seller quotation. Preparation does not queue or transmit an order.
Current boundaries
Exchange supports authenticated journal delivery and durable outgoing snapshots. Native adapters remain responsible for explicit Send actions, counterpart document creation, and reviewed application. Installation does not establish trust, activate document sending, confirm orders, validate stock, post accounting, or copy chatter.
Install pmis_federation_order for native RFQ/quotation and purchase/sales order sending, linked receiver drafts, quotation correspondence, and explicit revision review. Stock and accounting adapters remain separate.
Bug Tracker
Bugs are tracked on PMISuite Repository Issues.
Credits
Contributors
Matjaž Mozetič
Maintainers
Current maintainer:
Luxim is an independent R&D and deployment company focused on solving complex problems in the Odoo ecosystem.
Luxim is an active member of OCA (Odoo Community Association).





