The View Creation Challenge
Creating Odoo views is tedious but critical work. A well-designed form view guides users through data entry logically. A good list view shows the right columns at a glance. A useful search view has the filters people actually need. A kanban view presents data visually for pipeline management. Developers spend hours crafting XML for each view type, tweaking layouts, choosing widgets, and organizing fields into groups. AI coding agents analyze your model definitions and generate production-ready views in seconds.
Form View Generation
# AI reads the model:
class ProjectTask(models.Model):
_name = 'project.task.custom'
name = fields.Char(required=True)
project_id = fields.Many2one('project.project', required=True)
assigned_to = fields.Many2one('res.users')
state = fields.Selection([
('draft', 'Draft'), ('in_progress', 'In Progress'),
('review', 'Review'), ('done', 'Done'), ('cancelled', 'Cancelled')
], default='draft')
priority = fields.Selection([('0','Normal'),('1','High'),('2','Urgent')])
deadline = fields.Date()
estimated_hours = fields.Float()
actual_hours = fields.Float(compute='_compute_actual')
description = fields.Html()
tag_ids = fields.Many2many('project.tags')
attachment_ids = fields.Many2many('ir.attachment')
parent_id = fields.Many2one('project.task.custom')
child_ids = fields.One2many('project.task.custom', 'parent_id')
# AI generates form view:
<record id="project_task_custom_form" model="ir.ui.view">
<field name="name">project.task.custom.form</field>
<field name="model">project.task.custom</field>
<field name="arch" type="xml">
<form>
<header>
<button name="action_start" string="Start"
type="object" invisible="state != 'draft'"
class="oe_highlight"/>
<button name="action_review" string="Submit for Review"
type="object" invisible="state != 'in_progress'"
class="oe_highlight"/>
<button name="action_done" string="Mark Done"
type="object" invisible="state != 'review'"
class="oe_highlight"/>
<button name="action_cancel" string="Cancel"
type="object" invisible="state in ('done', 'cancelled')"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,in_progress,review,done"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_view_subtasks" type="object"
class="oe_stat_button" icon="fa-tasks"
invisible="not child_ids">
<field name="subtask_count" widget="statinfo"
string="Sub-tasks"/>
</button>
</div>
<widget name="web_ribbon" title="Cancelled"
bg_color="text-bg-danger"
invisible="state != 'cancelled'"/>
<div class="oe_title">
<h1>
<field name="priority" widget="priority"/>
<field name="name" placeholder="Task Title"/>
</h1>
</div>
<group>
<group>
<field name="project_id"/>
<field name="assigned_to" widget="many2one_avatar_user"/>
<field name="parent_id"/>
</group>
<group>
<field name="deadline" widget="remaining_days"/>
<field name="estimated_hours" widget="float_time"/>
<field name="actual_hours" widget="float_time"/>
<field name="tag_ids" widget="many2many_tags"
options="{'color_field': 'color'}"/>
</group>
</group>
<notebook>
<page string="Description">
<field name="description"/>
</page>
<page string="Sub-tasks">
<field name="child_ids">
<list>
<field name="name"/>
<field name="assigned_to"/>
<field name="state"/>
<field name="deadline"/>
</list>
</field>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>List View Generation
# AI selects the most useful columns for list view:
<record id="project_task_custom_list" model="ir.ui.view">
<field name="name">project.task.custom.list</field>
<field name="model">project.task.custom</field>
<field name="arch" type="xml">
<list decoration-danger="deadline and deadline < current_date
and state not in ('done','cancelled')"
decoration-muted="state == 'cancelled'">
<field name="priority" widget="priority" nolabel="1"/>
<field name="name"/>
<field name="project_id"/>
<field name="assigned_to" widget="many2one_avatar_user"/>
<field name="tag_ids" widget="many2many_tags"/>
<field name="deadline" widget="remaining_days"/>
<field name="estimated_hours" widget="float_time" sum="Total"/>
<field name="state" widget="badge"
decoration-info="state == 'draft'"
decoration-primary="state == 'in_progress'"
decoration-warning="state == 'review'"
decoration-success="state == 'done'"/>
</list>
</field>
</record>Kanban View Generation
# AI generates kanban for pipeline-style fields:
<record id="project_task_custom_kanban" model="ir.ui.view">
<field name="name">project.task.custom.kanban</field>
<field name="model">project.task.custom</field>
<field name="arch" type="xml">
<kanban default_group_by="state">
<templates>
<t t-name="card">
<div class="d-flex justify-content-between">
<field name="priority" widget="priority"/>
<field name="tag_ids" widget="many2many_tags"/>
</div>
<field name="name" class="fw-bold"/>
<div class="d-flex justify-content-between mt-2">
<field name="project_id"/>
<field name="deadline" widget="remaining_days"/>
</div>
<div class="mt-2">
<field name="assigned_to" widget="many2one_avatar_user"/>
</div>
</t>
</templates>
</kanban>
</field>
</record>Search View Generation
# AI creates useful search filters and groupings:
<record id="project_task_custom_search" model="ir.ui.view">
<field name="name">project.task.custom.search</field>
<field name="model">project.task.custom</field>
<field name="arch" type="xml">
<search>
<field name="name"/>
<field name="project_id"/>
<field name="assigned_to"/>
<field name="tag_ids"/>
<separator/>
<filter string="My Tasks" name="my_tasks"
domain="[('assigned_to', '=', uid)]"/>
<filter string="Unassigned" name="unassigned"
domain="[('assigned_to', '=', False)]"/>
<separator/>
<filter string="In Progress" name="in_progress"
domain="[('state', '=', 'in_progress')]"/>
<filter string="Overdue" name="overdue"
domain="[('deadline', '<', context_today().strftime('%Y-%m-%d')),
('state', 'not in', ('done', 'cancelled'))]"/>
<filter string="High Priority" name="high_priority"
domain="[('priority', 'in', ('1', '2'))]"/>
<separator/>
<filter string="Archived" name="archived"
domain="[('active', '=', False)]"/>
<group expand="0" string="Group By">
<filter string="Project" name="group_project"
context="{'group_by': 'project_id'}"/>
<filter string="Assigned To" name="group_assigned"
context="{'group_by': 'assigned_to'}"/>
<filter string="State" name="group_state"
context="{'group_by': 'state'}"/>
<filter string="Deadline" name="group_deadline"
context="{'group_by': 'deadline:month'}"/>
</group>
</search>
</field>
</record>AI View Intelligence
| Decision | AI Logic |
|---|---|
| Widget selection | Date → remaining_days, User → avatar, Tags → colored tags |
| Column ordering | Priority fields first, name second, key data, then state |
| Form layout | Required fields in header, related fields grouped, details in notebook |
| Search filters | "My records" filter, state filters, common date filters |
| List decorations | Overdue in red, cancelled muted, state as badge |
| Kanban grouping | Selection fields with workflow → default_group_by |
Advanced Views
- Pivot views for numeric fields (hours, amounts) with row/column grouping
- Graph views with appropriate chart types (bar for categories, line for time series)
- Calendar views for models with date fields
- Gantt views for project-like models with start/end dates
- Map views for models with partner addresses
- Activity views for models inheriting mail.activity.mixin
DeployMonkey AI View Generator
DeployMonkey's AI coding agent reads your Odoo model definitions and generates complete view sets — form, list, kanban, search, pivot, and graph views with proper widgets, decorations, and filters. Save hours of XML crafting and get polished views instantly.