跳至內容
選單
此問題已被標幟
1 回覆
7551 瀏覽次數

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>
頭像
捨棄
最佳答案

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.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
2月 18
4521
2
3月 24
10792
1
6月 23
2652
1
7月 20
5337
0
11月 18
2587