Files
odoo_source/addons/hr_gamification/static/src/js/gamification.js
T
Hiral Bhavsar 3cd7ed07a2 [IMP] *: remove 'view_type' on window actions.
The old tree views don't really exist anymore, this odd pseudo-flag to
dispatch between "list" and "tree" tree views has no reason to remain.

Task 1937686

closes odoo/odoo#31243

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-06-17 11:34:17 +00:00

32 lines
868 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',
views: [[false, 'form']],
res_id: this.record.badge_id.raw_value
};
this.do_action(action);
} else {
this._super.apply(this, arguments);
}
}
});
});