From 202264b4dd85efee35a86ea1a3b0e15f29ee7b11 Mon Sep 17 00:00:00 2001 From: "Paolo (pgi)" Date: Wed, 16 Feb 2022 14:23:00 +0000 Subject: [PATCH] [FIX] hr_expense, hr_timesheet, l10n_sa_invoice: Adapting barcode API callers to the new API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The change in the `barcode` API has broken many callers. This PR and the enterprise one will change 'type' -> 'barcode_type' closes odoo/odoo#84722 See: https://github.com/odoo/odoo/commit/ee324e8374536cebca4d7302210b07e8f33d3852#diff-8f0bbb50491623995fba965c3d64585c6cbfdbbe519ec95473e472826d253826R1977-R1979 Related: odoo/enterprise#24430 Signed-off-by: William André (wan) --- addons/hr_expense/static/src/js/expense_qr_code_action.js | 2 +- addons/hr_timesheet/static/src/js/qr_code_action.js | 2 +- addons/hr_timesheet/static/src/js/timesheet_config_form_view.js | 2 +- addons/l10n_sa_invoice/views/report_invoice.xml | 2 +- 4 files changed, 4 insertions(+), 4 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 5de326d04b5..00ceb37e2c2 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,7 +11,7 @@ const QRModalAction = AbstractAction.extend({ init: function(parent, action){ this._super.apply(this, arguments); - this.url = _.str.sprintf("/report/barcode/?type=QR&value=%s&width=256&height=256&humanreadable=1", action.params.url); + this.url = _.str.sprintf("/report/barcode/?barcode_type=QR&value=%s&width=256&height=256&humanreadable=1", action.params.url); }, }); 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 15419a1f666..35559139a7a 100644 --- a/addons/hr_timesheet/static/src/js/qr_code_action.js +++ b/addons/hr_timesheet/static/src/js/qr_code_action.js @@ -11,7 +11,7 @@ const QRModalAction = AbstractAction.extend({ init: function(parent, action){ this._super.apply(this, arguments); - this.url = _.str.sprintf("/report/barcode/?type=QR&value=%s&width=256&height=256&humanreadable=1", action.params.url); + this.url = _.str.sprintf("/report/barcode/?barcode_type=QR&value=%s&width=256&height=256&humanreadable=1", action.params.url); }, }); diff --git a/addons/hr_timesheet/static/src/js/timesheet_config_form_view.js b/addons/hr_timesheet/static/src/js/timesheet_config_form_view.js index 16229773037..dfa49acdaa1 100644 --- a/addons/hr_timesheet/static/src/js/timesheet_config_form_view.js +++ b/addons/hr_timesheet/static/src/js/timesheet_config_form_view.js @@ -15,7 +15,7 @@ odoo.define('hr_timesheet.res.config.form', function (require) { * @override */ init: function (parent, url) { - this.url = _.str.sprintf("/report/barcode/?type=QR&value=%s&width=256&height=256&humanreadable=1", url); + this.url = _.str.sprintf("/report/barcode/?barcode_type=QR&value=%s&width=256&height=256&humanreadable=1", url); this._super(parent, { title: _t('Download our App'), buttons: [{ diff --git a/addons/l10n_sa_invoice/views/report_invoice.xml b/addons/l10n_sa_invoice/views/report_invoice.xml index 9e87eec6393..d4c2185543a 100644 --- a/addons/l10n_sa_invoice/views/report_invoice.xml +++ b/addons/l10n_sa_invoice/views/report_invoice.xml @@ -24,7 +24,7 @@ + t-att-src="'/report/barcode/?barcode_type=%s&value=%s&width=%s&height=%s'%('QR', o.l10n_sa_qr_code_str, 150, 150)"/>