summaryrefslogtreecommitdiff
path: root/addons/hr_timesheet
diff options
context:
space:
mode:
authorGiacomello Nathan (ngi) <ngi@odoo.com>2020-09-16 13:45:49 +0000
committerGiacomello Nathan (ngi) <ngi@odoo.com>2020-09-17 13:08:28 +0000
commit0bf7ac7539fa4fb7f912bbb6fd477795cb77eff8 (patch)
tree07cd6cff808e790a2852118a33f9a1ba49dbb85a /addons/hr_timesheet
parent5a9c65a063d71ad3cb284ce72e83a2313da65e65 (diff)
[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 - <the url> This commit removes datas that are before the url so only the url is displayed. Task id: 2326324 closes odoo/odoo#57862 Related: odoo/enterprise#13319 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/hr_timesheet')
-rw-r--r--addons/hr_timesheet/static/src/js/qr_code_action.js7
1 files changed, 1 insertions, 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);
},
});