Skip to Content
Menu
This question has been flagged

Hi ,

Is it possible to Enable drag and Drop event in kanban view for my custom class. In my custom class i've defined kanban box and i want the move this Boxes along with Mouse Pointer(same as Project Module Kanban). just like Project Module Kanban same Drag and Drop in my custom Kanban View.







<record model="ir.ui.view" id="view_system_flow_kanban">
<field name="name">system.flow.kanban.kanban</field>
<field name="model">system.flow.dashboard</field>
<field name="arch" type="xml">
<kanban class="oe_background_grey o_project_kanban o_diagram">
<field name="image_small"/>
<field name="model_id"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="#{kanban_color(record.color.raw_value)} oe_kanban_card oe_kanban_global_click"
style="max-height:110px; max-width:200px; overflow:auto;">
<div class="o_project_kanban_main">
<div>
<div class="col-xs-6" style="text-align: center;">
<div style="border:1px; height:80px; width:150px; text-align: center;">
<div style="align: center;">
<t t-if="record.image_small.raw_value">
<img t-att-src="kanban_image('system.flow.dashboard', 'image_small', record.id.value)"
width="27" height="27"/>
</t>
</div>
<strong>
<span>
<field name="model_id"/>
</span>
</strong>
<br/>
<button class="btn btn-primary" type="object" name="open_edit_view">Create</button>
<button class="btn btn-primary" type="object" name="open_view">View</button>
</div>
</div>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
Avatar
Discard
Best Answer

Hi,

Try this

<kanban default_group_by="stage_id" class="o_kanban_small_column">

Here stage_id is the state.(eg: draft, done...) 

Note: It will work in the case of stage_id as a Many2one field. I am not sure in the case of stage_id as selection field.

Thank you.

Avatar
Discard
Related Posts Replies Views Activity
0
Feb 18
3580
2
Mar 24
4018
1
Jun 23
1582
1
Jul 20
4036
0
Nov 18
1913