İçereği Atla
Menü
Bu soru işaretlendi
1277 Görünümler

We trying to use some views(forms type) to the same model, but everytime only apears one of them. Here are our example code:

<!--************************************

    Our Actions

************************************-->

 

<record model="ir.actions.act_window" id="miinventario.action_vale_salida">

    <field name="res_model">stock.picking</field>

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

    <field name="view_ids" eval="[(5, 0, 0),

                                  (0, 0, {'view_mode': 'tree', 'view_id': ref('miinventario.tree_valesalida')}),

                                  (0, 0, {'view_mode': 'form', 'view_id': ref('miinventario.form_valesalida')})]"/>

</record>

 

 

<record model="ir.actions.act_window" id="miinventario.action_recepcion">

    <field name="res_model">stock.picking</field>

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

    <field name="view_ids" eval="[(5, 0, 0),

                                  (0, 0, {'view_mode': 'tree', 'view_id': ref('miinventario.tree_recepciones')}),

                                  (0, 0, {'view_mode': 'form', 'view_id': ref('miinventario.form_recepciones')})]"/>

</record>

 

<!--************************************

    Our MenuItems

************************************-->

 

<menuitem id="miinventario.mnu_vale_salida"

    name="Mi opcion 1"

    parent="stock.menu_stock_warehouse_mgmt"

    action="miinventario.action_vale_salida"

/>

 

<menuitem id="miinventario.mnu_recepcion"

    name="Mi opcion 2"

    parent="stock.menu_stock_warehouse_mgmt"

    action="miinventario.action_recepcion"

/>

We need some help. ¿Are there something wrong?

Avatar
Vazgeç

seems the codes are given correctly. Can you activate the developer mode and go to Window Actions menu under settings -> technical, and open the above actions and see, whether the views are correctly get added to the actions or not.