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_gamification/static/src | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/hr_gamification/static/src')
| -rw-r--r-- | addons/hr_gamification/static/src/js/gamification.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/addons/hr_gamification/static/src/js/gamification.js b/addons/hr_gamification/static/src/js/gamification.js new file mode 100644 index 00000000..32c0fdba --- /dev/null +++ b/addons/hr_gamification/static/src/js/gamification.js @@ -0,0 +1,31 @@ +odoo.define('hr_gamification.hr_gamification', function(require) { +"use strict"; + +var KanbanRecord = require('web.KanbanRecord'); + +KanbanRecord.include({ + //-------------------------------------------------------------------------- + // Private + //-------------------------------------------------------------------------- + + /** + * @override + * @private + */ + _openRecord: function () { + if (this.modelName === 'gamification.badge.user') { + var action = { + type: 'ir.actions.act_window', + res_model: 'gamification.badge', + view_mode: 'form', + views: [[false, 'form']], + res_id: this.record.badge_id.raw_value + }; + this.do_action(action); + } else { + this._super.apply(this, arguments); + } + } +}); + +}); |
