Skip to Content
Menu
This question has been flagged
2 Replies
2594 Views

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? 

Avatar
Discard
Best Answer

Hi,

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


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

Thanks

Avatar
Discard
Author

I tried to do this:

<kanban position="attributes">

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

</kanban>

And it's works! Thanks, Niyas!

Best Answer

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















Avatar
Discard
Related Posts Replies Views Activity
1
Mar 24
957
2
Aug 22
2125
0
Jun 21
2091
1
Jul 22
1461
0
Nov 24
68