[FIX] project: open the task form on clicking of task title from kanban

Currently, in the kanban view of the tasks when you click on title of
the task, it will not open the task in the form view.

so in this commit, Removed click event handlers on this widget for
kanban view to ensure that the kanban 'global click' opens the clicked
record, even if the click is done on a title of task.

closes odoo/odoo#70387

Taskid: 2510169
X-original-commit: d64b19d42ae70fa5a33a93e92cde8854ed2e0ab9
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
This commit is contained in:
Urvi Soni
2021-05-05 09:46:17 +00:00
committed by Barad Mahendra
parent 542618db8e
commit c3c8ee09cb
@@ -5,7 +5,22 @@ odoo.define('project.name_with_subtask_count', function (require) {
const FieldChar = require('web.basic_fields').FieldChar;
const FieldNameWithSubTaskCount = FieldChar.extend({
_render: function () {
/**
* @override
*/
init() {
this._super(...arguments);
if (this.viewType === 'kanban') {
// remove click event handler
const {click, ...events} = this.events;
this.events = events;
}
},
/**
* @override
*/
_render() {
let result = this._super.apply(this, arguments);
if (this.recordData.child_text) {
this.$el.append($('<span>')