Disable drag and sort features on kanban columns view in Odoo

Viewed 3932

I'm making a kanban view in Odoo 9 to display my model in columns based in a Many2one field.

I've created my kanban view like this:

<kanban create="false" edit="false" delete="false" quick_create="false" default_group_by="resource_id">

I only want this view for read only, I don't want to edit or create because I have another view to do it. It's like a dashboard.

The problem is that I want to disable the drag and drop and sortable feature for the columns. I see that the kanban_view.js file set the sortable and draggable options by default in the render_grouped function.

Does anyone know how to disable those features for columns? Or, is there any other way to display my records by columns in a kanban view?

4 Answers

In odoo 13 you can add the records_draggable attribute to your <kanban> tag:

<kanban records_draggable="false"></kanban>

For more check the kanban view section in the documentation

For old versions edit="false" is enough. For newer versions, set read only directly on the field <field name="resource_id" readonly="1">

Related