Tired of basic Kanban boards? Supercharge your Odoo 18 Kanban with custom logic, styles, and actions.
Kanban views in Odoo are great out-of-the-box. But sometimes, your process needs more than just drag-and-drop columns. With a bit of XML magic and Python logic, you can customize the Kanban view to give your users the exact functionality they need.
This guide will show you how to unlock the advanced power of Kanban view in Odoo 18.
🔍 What is a Kanban View in Odoo?
A Kanban view is a visual layout that groups records into stages or categories, displayed as draggable cards. It’s most commonly used in:
- CRM pipelines
- Project tasks
- Helpdesk tickets
- Inventory operations
By default, Kanban is clean and simple. But what if you want to add custom colors, icons, buttons, or filters? Let’s do it.
⚙️ Step-by-Step: Customize the Kanban View in Odoo 18
1. Define the Kanban View in XML
In your custom module, create a kanban view like this:
xml
<record id=”view_custom_kanban” model=”ir.ui.view”>
<field name=”name”>custom.model.kanban</field>
<field name=”model”>custom.model</field>
<field name=”arch” type=”xml”>
<kanban>
<field name=”stage_id”/>
<templates>
<t t-name=”kanban-box”>
<div class=”oe_kanban_card”>
<strong><field name=”name”/></strong>
<div><field name=”description”/></div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
2. Add Colors Based on Status
Make your Kanban cards visually meaningful:
xml
<kanban>
<field name=”kanban_state”/>
<templates>
<t t-name=”kanban-box”>
<div t-attf-class=”oe_kanban_card #{kanban_color}”>
<strong><field name=”name”/></strong>
<div><field name=”stage_id”/></div>
</div>
</t>
</templates>
</kanban>
In your model, compute kanban_color to return classes like bg-success, bg-warning, or bg-danger.
🛠️ Add Custom Buttons to Each Card
Add quick actions like “Mark as Done” or “Send Email” directly to cards:
xml
<a type=”object” name=”mark_done” class=”btn btn-success btn-sm”>Done</a>
In your model:
python
def mark_done(self):
for record in self:
record.write({‘stage_id’: self.env.ref(‘your_module.stage_done’).id})
This improves speed and user experience without opening the form view.
✨ Bonus: Use Kanban Tags and Progress Bars
You can include:
- Tags to represent labels or categories
- Progress bars for task tracking
- Avatar widgets to show assigned users
Example:
xml
<t t-if=”record.user_id.raw_value”>
<div class=”o_kanban_avatar”>
<field name=”user_id” widget=”many2one_avatar”/>
</div>
</t>
And for progress:
xml
<progress value=”50″ max=”100″></progress>
Dynamically show progress with fields like percentage_complete.
🔄 Add Grouping & Drag Logic
To enable grouping and drag-and-drop updates:
xml
<kanban default_group_by=”stage_id”/>
Make sure your stage_id has a sequence and is configured for grouping.
💬 Why Go Advanced With Kanban?
Here’s what custom Kanban views give you:
✅ Speed: Actions without opening records
✅ Clarity: Color-coded info at a glance
✅ Control: Only show fields that matter
✅ UX: A smooth, drag-and-drop experience
🙌 Final Thoughts – Kanban That Works for You
You’re not stuck with the default view. By customizing your Odoo 18 Kanban, you build a smoother, faster, and smarter interface for your team.
Need help building a tailored Kanban board for your project or client? I’d love to help you streamline your workflow.
Follow me on LinkedIn for more latest updates