[FIX] l10n_sa: Fix QR code generation on Invoice report

Sometimes, when the base64 data used to render the QR code is too long,
some of the special characters included might be wrongly encoded in the
url passed to the /report/barcode route. To avoid this, we format the QR
code string through the quote_plus method to make sure it's always
properly encoded

X-original-commit: 4b5b0caa75302c945d9f762526f1939783ef3250
Part-of: odoo/odoo#128429
This commit is contained in:
Mehdi Bendali Hacine
2023-07-15 10:54:20 +02:00
parent 928c567739
commit a0940e4db0
+1 -1
View File
@@ -24,7 +24,7 @@
<p>
<img t-if="o.l10n_sa_qr_code_str"
style="display:block;"
t-att-src="'/report/barcode/?barcode_type=%s&amp;value=%s&amp;width=%s&amp;height=%s'%('QR', o.l10n_sa_qr_code_str, 200, 200)"/>
t-att-src="'/report/barcode/?barcode_type=%s&amp;value=%s&amp;width=%s&amp;height=%s'%('QR', quote_plus(o.l10n_sa_qr_code_str), 200, 200)"/>
</p>
</t>
</xpath>