From 348f8d653295dacbfe840fa24b5bd9758626f713 Mon Sep 17 00:00:00 2001 From: "Giacomello Nathan (ngi)" Date: Wed, 16 Sep 2020 13:45:49 +0000 Subject: [PATCH] [FIX] hr_timesheet: Fix invalid caracters before QR code In Timesheets module, in Configuration => Settings, when clicking on "Download on the App Store" or "Get it on Google Play", a popup is displayed with a QR code. This QR code is composed of an url with some strange data before it: - 002 - 1 - This commit removes datas that are before the url so only the url is displayed. Task id: 2326324 closes odoo/odoo#58453 X-original-commit: 0bf7ac7539fa4fb7f912bbb6fd477795cb77eff8 Related: odoo/enterprise#13528 Signed-off-by: Yannick Tivisse (yti) --- addons/hr_timesheet/static/src/js/qr_code_action.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/addons/hr_timesheet/static/src/js/qr_code_action.js b/addons/hr_timesheet/static/src/js/qr_code_action.js index 74006295fa9..15419a1f666 100644 --- a/addons/hr_timesheet/static/src/js/qr_code_action.js +++ b/addons/hr_timesheet/static/src/js/qr_code_action.js @@ -11,12 +11,7 @@ const QRModalAction = AbstractAction.extend({ init: function(parent, action){ this._super.apply(this, arguments); - const qr_vals = [ - '002', // Version - '1', // Character Set - action.params.url, // Download app url - ]; - this.url = _.str.sprintf("/report/barcode/?type=QR&value=%s&width=256&height=256&humanreadable=1", encodeURI(qr_vals.join('\n'))); + this.url = _.str.sprintf("/report/barcode/?type=QR&value=%s&width=256&height=256&humanreadable=1", action.params.url); }, });