From 05043848a98012053c2ee3d3e860f7d4d3882209 Mon Sep 17 00:00:00 2001 From: Kairis Date: Mon, 21 Sep 2020 06:44:22 +0000 Subject: [PATCH] [FIX] expense: fix generated QRCode When there is no expense, a messages is shown: "Did you try the mobile app?" When clicking on the "Download on the App Store" or on the "Get it on Google Play" buttons, generated QR codes have some invalid data before it: - 002 - 1 - This commit removes datas that are before the url so only the url is displayed. closes odoo/odoo#60104 Taskid: 2326303 X-original-commit: a130784131c84326b2482ab3c4eea6e0bb3d881c Signed-off-by: Yannick Tivisse (yti) --- addons/hr_expense/static/src/js/expense_qr_code_action.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/addons/hr_expense/static/src/js/expense_qr_code_action.js b/addons/hr_expense/static/src/js/expense_qr_code_action.js index 19226545ede..5de326d04b5 100644 --- a/addons/hr_expense/static/src/js/expense_qr_code_action.js +++ b/addons/hr_expense/static/src/js/expense_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); }, });