with the new views, we removed the many2many_kanban widget on many2manys, since it is the default behaviour anyway, but we also removed it for a few one2manys. And this is a mistake, some one2manys have to behave like many2manys. (PR #17190)
33 lines
915 B
JavaScript
33 lines
915 B
JavaScript
odoo.define('hr_gamification.hr_gamification', function(require) {
|
|
"use strict";
|
|
|
|
var KanbanRecord = require('web.KanbanRecord');
|
|
|
|
KanbanRecord.include({
|
|
//--------------------------------------------------------------------------
|
|
// Private
|
|
//--------------------------------------------------------------------------
|
|
|
|
/**
|
|
* @override
|
|
* @private
|
|
*/
|
|
_openRecord: function () {
|
|
if (this.modelName === '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
|
|
};
|
|
this.do_action(action);
|
|
} else {
|
|
this._super.apply(this, arguments);
|
|
}
|
|
}
|
|
});
|
|
|
|
});
|