The kanban view has been split in various files, and js modules using them need to correctly import the classes.
25 lines
691 B
JavaScript
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);
|
|
}
|
|
}
|
|
});
|
|
|
|
});
|