[FIX] hr_expense, hr_timesheet, l10n_sa_invoice: Adapting barcode API callers to the new API

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) <wan@odoo.com>
This commit is contained in:
Paolo (pgi)
2022-02-18 12:29:00 +00:00
parent 952b2eb390
commit 202264b4dd
4 changed files with 4 additions and 4 deletions
@@ -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);
},
});
@@ -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);
},
});
@@ -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: [{
@@ -24,7 +24,7 @@
<xpath expr="//div[@name='qr_code']" position="inside">
<img t-if="o.l10n_sa_qr_code_str"
style="display:block;margin:10% auto 0 auto;"
t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s'%('QR', o.l10n_sa_qr_code_str, 150, 150)"/>
t-att-src="'/report/barcode/?barcode_type=%s&amp;value=%s&amp;width=%s&amp;height=%s'%('QR', o.l10n_sa_qr_code_str, 150, 150)"/>
</xpath>
</template>