| Versions | 18.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Lines of code | 10 |
| Technical Name |
l10n_ch_qr_generation_only_posted_state |
| License | OPL-1 |
| Website | https://www.2bit.ch/ |
| Versions | 18.0 |
QR Generation After Posted
Prevent Swiss QR bill generation on draft invoices — generate QR codes only after an invoice is confirmed.
Developed by 2BIT Digital GmbH — your Swiss Odoo partner for payroll, accounting, eCommerce, manufacturing and custom business solutions.
Overview
In Switzerland, invoice PDFs include a Swiss QR bill payment slip. Odoo generates the QR code as soon as the invoice is previewed or printed — even when it is still a draft without a confirmed payment reference.
This module blocks QR code generation on draft invoices. The QR bill is only included in the PDF after the invoice has been confirmed and a valid payment reference exists.
Business Impact
Why You Need This Module
Swiss QR bills require a confirmed payment reference (QR-Referenz) tied to the invoice number. On a draft invoice this reference does not yet exist, causing Odoo to throw an error when the PDF is previewed or printed.
Which Problems It Solves
- Error when previewing or printing a draft invoice with a QR-IBAN configured
- QR code generated without a valid payment reference
- Confusing error messages for accounting users working with draft Swiss invoices
Key Benefits For Accounting Teams
- Draft invoices can be previewed and printed without errors
- QR bill is generated correctly only after confirmation
- No configuration required — works automatically after installation
How It Works
- Install the module — no further configuration needed.
- Preview or print a draft invoice → the PDF is generated without a QR bill.
- Confirm the invoice → a valid payment reference is assigned.
- Preview or print the confirmed invoice → the Swiss QR bill appears correctly at the bottom of the PDF.
Screenshots
Draft Invoice — No QR Bill
A draft invoice PDF is generated without a QR bill. No errors occur even when a QR-IBAN is configured on the journal.
Confirmed Invoice — Swiss QR Bill Included
After confirmation, the invoice PDF includes the Swiss QR bill payment slip with the correct payment reference and QR code.
Installation
- Mount this module as an Odoo custom addon.
- Update the apps list in Odoo.
- Install the module from the Apps menu.
- Requires a bank journal with a configured QR-IBAN for the Swiss QR bill to appear on confirmed invoices.
Dependencies
- Odoo modules:
account,l10n_ch - Python dependencies: none
Need Swiss Odoo Experts?
Whether it's payroll, accounting, or custom development — 2BIT Digital GmbH helps Swiss companies get the most out of Odoo.
Have questions or need customization? Just reach out — we’re happy to help.
Contact 2BIT Digital GmbH| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Lines of code | 10 |
| Technical Name |
l10n_ch_qr_generation_only_posted_state |
| License | OPL-1 |
| Website | https://www.2bit.ch/ |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module