[FIX] project: Open tasks when clicking on kanban record

Purpose
=======

Reintroduce the horrible bidouille that was removed by mistake.

closes odoo/odoo#52041

Note: Should be cleaned though.
Taskid: 2266510
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
Yannick Tivisse
2020-05-28 07:58:08 +00:00
parent 8414e6b9fd
commit b6235bb93e
@@ -5,6 +5,26 @@ var KanbanController = require('web.KanbanController');
var KanbanView = require('web.KanbanView');
var KanbanColumn = require('web.KanbanColumn');
var view_registry = require('web.view_registry');
var KanbanRecord = require('web.KanbanRecord');
KanbanRecord.include({
//--------------------------------------------------------------------------
// Private
//--------------------------------------------------------------------------
/**
* @override
* @private
*/
// YTI TODO: Should be transformed into a extend and specific to project
_openRecord: function () {
if (this.modelName === 'project.project' && this.$(".o_project_kanban_boxes a").length) {
this.$('.o_project_kanban_boxes a').first().click();
} else {
this._super.apply(this, arguments);
}
},
});
var ProjectKanbanController = KanbanController.extend({
custom_events: _.extend({}, KanbanController.prototype.custom_events, {