Odoo Help


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

on 6/3/14, 1:56 AM 907 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
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"/>

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

2 follower(s)


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