Skip to Content
Menu
This question has been flagged
1 Reply
1708 Views

I made a kanban view

<record id="project_budget_kanban" model="ir.ui.view">
<field name="name">Tarjetas de Proyectos</field>
<field name="model">project.budget</field>
<field name="arch" type="xml">
<kanban>
<!-- Campos que se van a usar en la vista -->
<field name="name" />
<field name="description" />
<templates>
<t t-name="kanban-box">
<div class="o_kanban_details oe_kanban_global_click_edit">
<strong class="o_kanban_record_title">
<div class="card-title">
<field name="display_name" />
</div>
<div class="card-text">
<field name="description" />
</div>
</strong>
</div>
</t>
</templates>
</kanban>
</field>
</record>

The I added to my menu

   <act_window id="action_project_budget"
name="Lista de Proyectos"
res_model="project.budget"
view_mode="tree,kanban,form"
    />

When I add the url for tree or kanban it works.
The view switcher is not
Avatar
Discard
Best Answer

Hi,

If you are adding a new view to an existing menu, after defining the corresponding view try to add the view to corresponding action like this,

<record id="base.action_partner_supplier_form" model="ir.actions.act_window">
<field name="view_mode">kanban,tree,form</field>
</record>
Give the ID as original_module_name.original_id .
Also you can have a look at this: How To Define Tree and Form View In Odoo

Thanks

Avatar
Discard