Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
3833 Vizualizări

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? 

Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

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


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

Thanks

Imagine profil
Abandonează
Autor

I tried to do this:

<kanban position="attributes">

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

</kanban>

And it's works! Thanks, Niyas!

Cel mai bun răspuns

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















Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
mar. 24
2229
2
aug. 22
3056
0
iun. 21
2913
1
iul. 22
2765
1
iul. 25
2353