diff options
| author | Géry Debongnie <ged@odoo.com> | 2015-03-10 08:45:02 +0100 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2015-03-18 09:01:52 +0100 |
| commit | 2ebe3076d2abbe2bef3ed7612af212f23382c0d5 (patch) | |
| tree | 0575cb0b120cd9925222b1ef76d71d727b9b4114 /addons/hr_gamification | |
| parent | 858e46e977de772c36d3073d0d61b2a3c5958117 (diff) | |
[REF] hr: update to the new module system
Diffstat (limited to 'addons/hr_gamification')
| -rw-r--r-- | addons/hr_gamification/static/src/js/gamification.js | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/addons/hr_gamification/static/src/js/gamification.js b/addons/hr_gamification/static/src/js/gamification.js index a9126464a10..ad065ecfa23 100644 --- a/addons/hr_gamification/static/src/js/gamification.js +++ b/addons/hr_gamification/static/src/js/gamification.js @@ -1,19 +1,24 @@ -openerp.hr_gamification = function(instance) { - instance.web_kanban.KanbanRecord.include({ - on_card_clicked: function() { - if (this.view.dataset.model === 'gamification.badge.user') { - var action = { - type: 'ir.actions.act_window', - res_model: 'gamification.badge', - view_mode: 'form', - view_type: 'form,kanban,tree', - views: [[false, 'form']], - res_id: this.record.badge_id.raw_value[0] - }; - this.do_action(action); - } else { - this._super.apply(this, arguments); - } +odoo.define('hr_gamification.hr_gamification', ['web_kanban.common'], function(require) { +"use strict"; + +var common = require('web_kanban.common'); + +common.KanbanRecord.include({ + on_card_clicked: function() { + if (this.view.dataset.model === 'gamification.badge.user') { + var action = { + type: 'ir.actions.act_window', + res_model: 'gamification.badge', + view_mode: 'form', + view_type: 'form,kanban,tree', + views: [[false, 'form']], + res_id: this.record.badge_id.raw_value[0] + }; + this.do_action(action); + } else { + this._super.apply(this, arguments); } - }); -}; + } +}); + +}); |
