Odoo Help

Welcome!

This community 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.

0

Action shows form instead of a tree

By
Marcelo Hamra
on 11/14/13, 8:39 AM 1,292 views

Hi, i'm using OpenERP 7.0.

I've extended res.partner model and I've created custom form and trees in my custom module for a res.partner model. I've created three actions and 1 menu. It works fine, the only thing that is not working is that when I click the menu, an empty forms is being showed, instead of the tree with

    <record id="action_menora_socios" model="ir.actions.act_window">
        <field name="name">Socios</field>
        <field name="res_model">res.partner</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
        <field name="domain">[('apellido','<>',False)]</field>
        <field name="help">Gestionar la base de socios, relaciones, asistencia a cursos y eventos</field>
    </record>

    <record id="action_menora_socios_tree" model="ir.actions.act_window">
        <!-- <field eval="1" name="sequence"/>  -->
        <field name="view_type">tree</field>
        <field name="view_id" ref="view_socios_menora_tree"/>
        <field name="act_window_id" ref="action_menora_socios"/>
    </record>

    <record id="action_menora_socios_tree" model="ir.actions.act_window">
        <!--<field eval="0" name="sequence"/> -->
        <field name="view_type">form</field>
        <field name="view_id" ref="view_socios_menora_form"/>
        <field name="act_window_id" ref="action_menora_socios"/>
    </record>

    <menuitem action="action_menora_socios" id="menu_menora_socios" 
            parent="menora.menu_gestion_socios" sequence="10" groups="base.group_user"/>

Is there something i'm doing wrong?

Why are you creating three act.windows?

GH Mediacloud, Grover Menacho
on 11/14/13, 8:49 AM

Because i need two custom views, one for the form and the other for the tree.

Marcelo Hamra
on 11/14/13, 11:48 AM
0
Rakesh Sindhav (RSI)
On 2/24/15, 1:37 AM

Marcelo Hamra

Here you make a silly mistack on id of record. You give the same id in the ir.actions.act_window (id="action_menora_socios_tree"). Change the one Id as _form and it will work

0
Anagh
On 1/19/15, 12:58 AM

use sequence in the action of the respective tree and form views  as follows

Dont forget to give a lower sequence number for the tree action(gives it high priority) 

eg for tree action:

            <field name="sequence">1</field>

and for form action

            <field name="sequence">6</field>

0
Anagh
On 1/19/15, 12:58 AM

use sequence in the action of the respective tree and form views  as follows

Dont forget to give a lower sequence number for the tree action(gives it high priority) 

eg for tree action:

            <field name="sequence">1</field>

and for form action

            <field name="sequence">6</field>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 11/14/13, 8:39 AM
Seen: 1292 times
Last updated: 3/16/15, 8:10 AM