summaryrefslogtreecommitdiff
path: root/addons/hr_gamification/static/src
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2014-01-06 14:57:00 +0100
committerThibault Delavallée <tde@openerp.com>2014-01-06 14:57:00 +0100
commit49c0b7a82003a889edc19cb189d0d6d0ebda2c5f (patch)
treed24c9d3fe3baad3ba06f11d4bf334e2504fb6092 /addons/hr_gamification/static/src
parentc4c268c902a134efdf0f097053c9b28d6b14417c (diff)
parentced63415b7319e12fb9d31a3e370850278f697c1 (diff)
[MERGE] Sync with trunk
bzr revid: tde@openerp.com-20140106135700-rt0g44w5xmpbtxiu
Diffstat (limited to 'addons/hr_gamification/static/src')
-rw-r--r--addons/hr_gamification/static/src/js/gamification.js19
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);
+ }
+ }
+ });
+};