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"/>
</tree>
</field>
</record>
<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"/>
</tree>
</field>
</record>
<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>
<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>
</record>
<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.
Hope this will helps: http://learnopenerp.blogspot.com/2020/01/open-wizard-on-button-click-in-odoo.html
or
https://goo.gl/Baw9Zt
Hello,
Please try to this ways:
<button name="%(action_tree_destination)d" string="Open Tree" class="oe_edit_only" type="action"></button>