Skip to Content
Menu
This question has been flagged

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

Avatar
Discard
Related Posts Replies Views Activity
1
Oct 20
3358
2
Mar 16
4790
2
Jul 23
1505
3
Jun 20
4133
1
Apr 16
4193