diff options
| author | Atul Patel (OpenERP) <atp@tinyerp.com> | 2014-02-18 11:26:18 +0530 |
|---|---|---|
| committer | Atul Patel (OpenERP) <atp@tinyerp.com> | 2014-02-18 11:26:18 +0530 |
| commit | 33b99c8a0737e08e6a243e41bb455d3ab7e6c851 (patch) | |
| tree | a1db52bfbeecf0c6fd9096604b7ec4540bb04197 /addons/hr_gamification/static | |
| parent | caa3510ea434e10c32dcbc134f9c74b2b9f18b2a (diff) | |
| parent | aa0eac1257b97c1be693e8a804fec6ecbf2bb22f (diff) | |
[MERGE]: Merged with addons
bzr revid: atp@tinyerp.com-20140218055618-r36w29vat7zig9ar
Diffstat (limited to 'addons/hr_gamification/static')
| -rw-r--r-- | addons/hr_gamification/static/src/js/gamification.js | 19 |
1 files changed, 19 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 00000000000..a9126464a10 --- /dev/null +++ b/addons/hr_gamification/static/src/js/gamification.js @@ -0,0 +1,19 @@ +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); + } + } + }); +}; |
