Odoo Help


How to change default action of elements of tree view?

on 9/6/14, 10:56 PM 1,877 views

Here's the thing, i want to go to another tree view of another module when clicking on an element of the first tree view, instead of the predetermined form view. What i tried:

        <record id="view_destination_tree" model="ir.ui.view">
                    <field name="name">delivery.destination</field>
                    <field name="model">delivery.destination</field>
                    <field name="priority">1</field>
                    <field name="arch" type="xml">
                        <tree string="Destinos">
                            <field name="coordenadas" string="Coordenadas"/>
                            <field name="client" string="Cliente"/>
                            <field name="is_default" string="Predeterminado"/>

        <record id="view_clients" model="ir.ui.view">
                    <field name="name">client.dest</field>
                    <field name="model">res.partner</field>
                    <field name="priority">1</field>
                    <field name="arch" type="xml">
                        <tree string="Clientes con Destinos">
                            <field name="name" string="Cliente"/>
                            <field name="has_destination" string="Tiene destino"/>

        <record model="ir.actions.act_window" id="action_clients">

                    <field name="name">Lista de Destinos</field>

                    <field name="res_model">res.partner</field>
                    <field name="view_id" ref="view_clients"/>

                    <field name="view_type">tree</field>

                    <field name="view_mode">tree</field>


        <record model="ir.actions.act_window" id="action_tree_destination">

                    <field name="name">Lista de Destinos</field>

                    <field name="res_model">delivery.destination</field>
                    <field name="view_id" ref="view_destination_tree"/>

                    <field name="view_type">tree</field>

                    <field name="view_mode">tree</field>


<menuitem id="main_menu_ruta" name="Rutas"/>
            <menuitem id="Rutas" parent="main_menu_ruta" name="Rutas"/>
            <menuitem id="Destinos" parent="Rutas" action="action_tree_destination" name="Destinos"/>

I want to call action_clients when clicking in view_destination_tree. I tried some things but the clicking doesn't get me anywhere.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 9/6/14, 10:56 PM
Seen: 1877 times
Last updated: 3/16/15, 8:10 AM