Files
odoo_source/addons/hr_gamification/static/src/js/gamification.js
T
pka-odoo ab0bd7be25 [FIX] (hr_)gamification,sales_team: one2many with many2many widget
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)
2017-06-06 11:33:31 +02:00

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);
}
}
});
});