diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/hr_timesheet/static/src/js/qr_code_action.js | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/hr_timesheet/static/src/js/qr_code_action.js')
| -rw-r--r-- | addons/hr_timesheet/static/src/js/qr_code_action.js | 19 |
1 files changed, 19 insertions, 0 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 new file mode 100644 index 00000000..15419a1f --- /dev/null +++ b/addons/hr_timesheet/static/src/js/qr_code_action.js @@ -0,0 +1,19 @@ +odoo.define('hr_timesheet.qr_code_action', function (require) { + "use strict"; + +const AbstractAction = require('web.AbstractAction'); +const core = require('web.core'); +const config = require('web.config'); + +const QRModalAction = AbstractAction.extend({ + template: 'hr_timesheet_qr_code', + xmlDependencies: ['/hr_timesheet/static/src/xml/qr_modal_template.xml'], + + 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); + }, +}); + +core.action_registry.add('timesheet_qr_code_modal', QRModalAction); +}); |
