Hey everyone,
I am trying to reduce the size of a Kanban tile if the task is a subtask, i.e., `parent_id` is set.
I got the below code. The alert function executes fine, but the tile remains unchanged. I also tried coloring and tried several class selectors but nothing seems to work.
Help would be great.
Below is my javascript code.
odoo.define('subtask_resize.kanban_subtask_resize',function(require){
"use strict";
var KanbanRecord = require('web.KanbanRecord');
KanbanRecord.include({
renderElement: function () {
this._super.apply(this, arguments);
//Apply the color to the record, if there is one.
if (this.recordData['parent_id'] != false){
this.$el.find('.oe_kanban_card').css({"width":"90%","margin-left":"5px"});
var core = require('web.core');
alert(core._t(this.recordData['name']));
}
}
});
});