odoo/odoo#206935

Created by fw-bot
Closed
label
odoo-dev:saas-18.2-17.0-opw-4585574-swiss_qr_draft_invoice-yosa-430989-fw
head
4955c913e88e00382bd5377a0a66c1519e057249
odoo/odoo
17.0 #198498
saas-17.4 #204661
18.0 #206915
saas-18.1 #206928
saas-18.2 #206935

[FW][FIX] l10n_ch: prevent stopping pdf generation if in draft

Steps to reproduce:
- enable qr code
- create an invoice with a swiss client
- try to print it

Issue:
An error is raised

Cause:
There is no reference for a Swiss invoice in draft. If there is no reference, it is not possible to print the qr code in Switzerland.

Solution:
We prevent QR code generation whenever the invoice is in draft.

opw-4585574

Forward-Port-Of: #204661
Forward-Port-Of: #198498