Files
odoo_source/addons/hr_gamification/static/src/js/gamification.js
T
Géry Debongnie 461e3d6784 [FIX] various: update some js modules to new kanban
The kanban view has been split in various files, and js modules
using them need to correctly import the classes.
2015-06-15 16:30:36 +02:00

25 lines
691 B
JavaScript

odoo.define('hr_gamification.hr_gamification', function(require) {
"use strict";
var KanbanRecord = require('web_kanban.Record');
KanbanRecord.include({
on_card_clicked: function() {
if (this.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);
}
}
});
});