Invoice YellowBill Export
This module generates the YellowBill (ybInvoice V2.0.4) XML payload of a customer invoice or credit note.
More information at https://www.postfinance.ch/en/support/documents/downloads-documents.html
This module only builds and validates the payload; how it is transmitted is left to the module implementing the exchange.
auto_awesome What this module does
AI-generated from the code · Odoo 19.0Builds the Swiss eBill YellowBill XML file for a customer invoice or credit note, ready to be sent through the eBill network. It checks the invoice first and refuses to export if required data is missing.
This module adds a behind-the-scenes tool that turns a posted customer invoice or credit note into the standard Swiss eBill (YellowBill) XML document. It does not send anything itself; it only prepares the file, so a separate exchange module can deliver it.
What it does: - Only customer invoices and credit notes can be exported; any other document type is refused with an error message. - If the bill is to be paid by bank transfer, the invoice must have a recipient bank account, otherwise the export is blocked. - Credit notes are marked as credit advices and their amounts are shown as negative. - The XML is filled with the company (sender) address and VAT number, the customer address, an optional delivery address, the currency, the invoice date, the due date and the payment reference. - Bank details (IBAN, BIC, bank name) are included when payment is by transfer. - Each product line is listed with description, product code, quantity, unit, tax rate and amounts; layout-only lines such as notes or sections are skipped. - A tax summary per rate, early-payment discount terms, totals (exclusive, inclusive, paid, due) and an optional PDF appendix are added. - When the invoice comes from a single sales order, the order reference and order date are included. - The generated file can be checked against the official YellowBill format definition, and any format error is reported to the user.
It works on invoices (account.move) and uses sales order links, so it depends on Accounting, Swiss localization and Sales.
Depends on
Models and fields (1)
- account.invoice.yellowbill · new model
Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 1 confirmed, 8 with no information of 9 versions.
Sources · Odoo 19.0
Confirmed on 2026-11-03 in branch 19.0 of OCA/l10n-switzerland.
terminal Installation and usage
OCA documentation · Odoo 19.0Usage
Source · Odoo 19.0The payload is built by the account.invoice.yellowbill model. The caller passes the identifiers of its own eBill contract:
payload = self.env["account.invoice.yellowbill"]._export_invoice(
invoice,
biller_id="99999999999999999",
ebill_account_id="11111111111111111",
transaction_id="240101120000-INV0001",
pdf_data=base64_encoded_pdf,
)
self.env["account.invoice.yellowbill"]._validate_payload(payload)No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.