Odoo Help


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.


Same Action, Different Menus, Menus are independent of each other. How can we implement this?

on 6/3/14, 1:56 AM 599 views

For eg: 

action : project.project

Different Menu : Project, Implementation, ...

We are calling same action for different menus, both the menus are idependent. When we create a record in Project Menu,it should not appear in Implementation menu,viceversa.

<record model="ir.actions.act_window.view" id="a_unique_name_as_id"> <field name="sequence" eval="2"/> <field name="view_mode">form</field> <field name="view_id" ref="your_view_ref_id"/><!--use ref="purchase_order_hash_form_test"--> <field name="act_window_id" ref="your_action_reference_id"/><!--use ref='action_PO_hash_test'--> </record>

I know this.

But i want to know,Any solution to assign Menus for same action through xml code or interface?

I think need to create two different action for same object w/ith based on domain condition. Example Refer Base Module res_partner_view.xml File.

on 6/3/14, 2:09 AM

You mean for supplier and customer?? But still we can view all partners there?

on 6/3/14, 2:45 AM


| 5 4 7
Bikaner, India

OpenERP Devloper at SunARC Technology

On 6/3/14, 3:00 AM

The below  example,  two Actions created for same object In the First menu its shows only record (check field value is True).

In the second Menu its shows only record (check field value is Fasle).


    <record id="action_custom_project_view" model="ir.actions.act_window">
        <field name="name">Project Mangement</field>
        <field name="res_model">project.project</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
        <field name="domain">[('field_name','=',True)]</field>
        <field name="search_view_id" ref="view_project_filter" />
        <field name="context">{}</field>

    <record id="action_custom_impl_view" model="ir.actions.act_window">
        <field name="name">Imp</field>
        <field name="res_model">project.project</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
        <field name="domain">[('field_name','=',False)]</field>
        <field name="search_view_id" ref="view_project_filter" />
        <field name="context">{}</field>

 <menuitem id="menu_project_form" parent="" action="action_custom_project_view" sequence="1"/>

 <menuitem id="menu_imp_form" parent="" action="action_custom_impl_view" sequence="2"/>

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

2 follower(s)


Asked: 6/3/14, 1:56 AM
Seen: 599 times
Last updated: 3/16/15, 8:10 AM