Odoo is a comprehensive ERP platform that provides multiple ways to organize and manage business data. Among these, the Kanban view stands out as one of the most intuitive and visually engaging options. Displaying records in a card-style layout makes workflow and project management easier to follow and control. In this blog, we’ll walk you through the process of creating a Kanban view in Odoo 19.
What is a Kanban view?
A Kanban view is a visual management tool that helps track tasks and workflows in a clear and organized manner. It typically uses columns to represent different stages of a process, while cards represent individual tasks or records that can be moved between these stages. This approach enables teams to easily monitor progress, limit ongoing work, and enhance overall efficiency.
It allows you to drag and drop items between stages, making it especially useful for workflows like:
- Sales pipeline management
- Project task tracking
- Recruitment stages
- Manufacturing orders
Define Your Model
In Odoo, everything starts with a model, which represents a specific business object or entity. For this example, we’ll build a Kanban view for a model called test.model. The model will contain basic fields like name, description, and state to store relevant information.
from odoo import models, fields
class TestModel(models.Model):
_name = 'test.model'
_description = 'Test Model'
name = fields.Char(string='Name', required=True)
description = fields.Text(string='Description')
date_order = fields.Date(string='Date')
state = fields.Selection([
('draft', 'Draft'),
('in_progress', 'In Progress'),
('done', 'Done'),
], string='State', default='draft')
activity_state = fields.Selection([
('overdue', 'Overdue'),
('today', 'Today'),
('planned', 'Planned')], string='Activity State',)
Create the Kanban View
The next step is to define the Kanban view. Inside your module’s views directory, create an XML file (for example: test_model_views.xml) where the Kanban layout will be configured. This file will describe how the records should appear as cards and how they will be grouped in the interface.
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="test_model_view_kanban" model="ir.ui.view">
<field name="name">test.model.view.kanban</field>
<field name="model">test.model</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile" sample="1" quick_create="false">
<progressbar field="activity_state"
colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
<templates>
<t t-name="card">
<div class="d-flex mb-2" style="justify-content: space-between;">
<field name="name" class="fw-bolder fs-5" />
<field name="date_order" class="ms-1 text-muted fs-5"/>
</div>
<footer>
<div class="d-flex text-muted">
<field name="description"/>
</div>
<div>
<field name="state"
widget="label_selection"
options="{'classes': {'draft': 'info', 'done': 'default', 'in_progress': 'success'}}" class="ms-auto"/>
</div>
</footer>
</t>
</templates>
</kanban>
</field>
</record>
<!--Add an action to open the Kanban view-->
<record id="test_model_action" model="ir.actions.act_window">
<field name="name">Test Model</field>
<field name="res_model">test.model</field>
<field name="view_mode">kanban,form</field>
<field name="view_id"
ref="test_model_view_kanban"/>
</record>
<menuitem id="menu_test_model"
name="Products"
action="test_model_action"
sequence="1"/>
</odoo>
Final Step: Kanban View Example
Now that we’ve gone through the fundamentals of creating a simple Kanban view in Odoo 18, let’s look at a basic code snippet to set it up. Below is an example of how the Kanban view definition will appear:

Creating a Kanban view in Odoo 18 is a straightforward process that can significantly enhance team productivity and simplify workflow management. With just a few steps, you can tailor the view to match your business requirements, ensuring better organization and smoother operations. Whether you’re managing projects, tracking sales, or handling other business processes, the Kanban view is a powerful feature that adds both clarity and efficiency to your Odoo environment.
To read more about How to Create Kanban View in Odoo 18, refer to our blog How to Create Kanban View in Odoo 18.