Peppol Commercial Access Point
Send customer invoices directly to any commercial Peppol access point over REST API without the need for Enterprise edition or third-party hosted services.
Why this module
Peppol Commercial Access Point
No third-party dependency
Send directly to your Peppol access-point account without relying on a third-party invoice service or a hosted proxy. You control the credentials and the endpoint.
Configurable REST shape
Accommodate variations in access-point API design via configurable paths (submit_path, poll_path) and multi-field response mapping, so you can integrate with different providers.
Minimal overhead
Adapter-only module with no UI dependencies. Reuses the parent Peppol framework for company setup, UBL generation, and inbound document parsing. No extra database tables.
Day in the life
A financial controller sends invoices via Peppol
1. Admin installs module and configures parent eh_account_einvoice_peppol. 2. Controller navigates to company settings and selects the 'Commercial' access-point adapter, enters the REST base URL and API key from their Peppol provider. 3. Controller creates a sales invoice, sets customer's Peppol ID (e.g. 0151:53004085616), clicks Send via Peppol. Module POSTs the UBL XML to the provider's /documents endpoint with Bearer auth, records the transmission ID. 4. Overnight, the poll cron queries the provider's /inbound endpoint, fetches any arrived invoices from customers, and creates inbound records. 5. Controller reviews inbound invoices in the Peppol inbox, matches to POs, posts them.
Edge cases
The cases most modules quietly ignore.
In the shipped code today, each one a place where a cheaper module silently does the wrong thing.
If an inbound message JSON is malformed or lacks expected fields (document, messageId, etc.), the adapter gracefully skips it or fills with empty strings rather than crashing the poll.
If a document field is not valid base64, the adapter catches the exception and stores an empty byte string, allowing the poll to continue and create a record the user can inspect.
If base_url or api_key are blank in config, the adapter raises AccessPointError at instantiation, preventing silent failures.
The adapter accepts either a JSON object with 'messages' key or a direct array, and looks for document in 'document' or 'xml' fields, accommodating provider differences.
What is inside
Built to do the job, end to end.
- adapters/commercial_ap.py. CommercialAccessPoint class with submit() and poll() methods. Reads config['credentials'] for base_url, api_key, sender_id, submit_path, poll_path. POST to endpoint with base64-encoded UBL; GET poll endpoint with since timestamp. Flexible JSON parsing for transmission_id and inbound messages.
- adapters/__init__.py. Module entrypoint that imports commercial_ap, triggering adapter registration via register_adapter('commercial', ...) call in commercial_ap.py.
- tests/test_commercial_ap.py. 4 TransactionCase tests: adapter registration, missing credentials error, submit request construction (URL, headers, body structure), poll response mapping. All HTTP mocked, no network access.
- __init__.py. Module initialization file that imports adapters subpackage, loading the CommercialAccessPoint adapter and registering it in the parent Peppol framework's adapter registry.
Honest about the edges
What this does not do, so nothing surprises you.
- Requires parent module eh_account_einvoice_peppol to be installed and configured first.
- Does not generate UBL XML, validate Peppol IDs, or parse inbound documents; all handled by parent.
- Does not provide a configuration UI; company must set REST credentials and paths via parent module's company-level config mechanism.
- Depends on customer having an active account with a commercial Peppol access point and valid API credentials.
- Does not handle document encryption, signing, or AS4 protocol; the access-point provider handles those entirely.
Peppol access point, REST API adapter, e-invoicing transmission, Odoo Community Peppol, UBL over REST, commercial access point, BYO API key, invoice transmission, inbound polling, Peppol REST client, API authentication, no IAP e-invoicing, Odoo 19 Peppol
Modules teams pair with this one.
Premium ERP Heritage modules that extend the same stack, each built to the same engineering bar.
Inbound webhook receiver for the Employment Hero people and payroll platform on Odoo 19 Community
Real-time fiscalisation of customer invoices and credit notes with the Mauritius Revenue Authority e-Invoicing (E...
The Canada country pack for the ERP Heritage Employment Hero integration
Imports finalised pay run journals from the Employment Hero payroll platform (KeyPay) into Odoo Community account...
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Purchase (purchase) • Discuss (mail) |
| Community Apps Dependencies | Show |
| Lines of code | 6976 |
| Technical Name |
eh_account_einvoice_peppol_ap_commercial |
| License | LGPL-3 |
| Website | https://www.erpheritage.com.au/ |
Please log in to comment on this module