跳至内容
菜单
此问题已终结
2 回复
3783 查看

Hello,

Recruitment application has kanban "Hr Applicants kanban".
How can you prevent kanban items from being draggable? 

I tried to do this:

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record
id="hr_applicant_view_kanban_inherit_for_not_draggable" model="ir.ui.view">
<field
name="name">hr.applicant.view.kanban.inherited</field>
<field
name="model">hr.applicant</field>
<field
name="inherit_id" ref="hr_recruitment.hr_kanban_view_applicant"/>
<field
name="arch" type="xml">
<kanban
position="attributes">
<attribute
name="draggable">false</attribute>
</kanban>
</field>
</record>
</data>
</odoo>

Or this:

<attribute name="draggable">0</attribute>

or

<attribute name="edit">false</attribute>


But not one of them didn’t work. Maybe it needs to be done somehow using XPath?
Do you have any ideas? 

形象
丢弃
最佳答案

Hi,

Set records_draggable="0" for the kanban view in Odoo14.


See: How to Disable Drag and Drop in Odoo Kanban View

Thanks

形象
丢弃
编写者

I tried to do this:

<kanban position="attributes">

<attribute name="records_draggable">false</attribute>

</kanban>

And it's works! Thanks, Niyas!

最佳答案

Hi, use this code to stop drag and drop in the existing kanban view  (Odoo16)
INHERITING PROJECT TASK kanban view.






id="view_project_kanban_inherit_stop" model="ir.ui.view">
name="name">project.kanban.inherit
name="model">project.task
name="inherit_id" ref="project.view_task_kanban"/>
name="priority" eval="100"/>
name="arch" type="xml">

expr="//kanban" position="attributes">
name="records_draggable">false















形象
丢弃
相关帖文 回复 查看 活动
1
3月 24
2199
2
8月 22
3037
0
6月 21
2899
1
7月 22
2748
1
7月 25
2297