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

How to apply a group on already created menu ? [Closed]

By
Xsias
on 8/27/13, 1:21 PM 1,516 views

The Question has been closed

by
Xsias
on 08/27/2013 13:25:25

I need to add a group on a mrp menu. The menu already exist, i only need to apply that group in a menu.

How can i do that with an inherit in xml ? How can I apply groups to those menus ?

0
Xsias
On 8/27/13, 1:25 PM

Thanks to odony in http://stackoverflow.com/questions/13450393/apply-groups-on-already-created-menu

I write here his answer.

Adding a group to an existing menu is done via the normal OpenERP record update mechanism. You don't actually have to fully redefine the existing menu record in your module, you just declare a <record> with the same ID, with only a value for the groups_id field:

<record id="original_module.menu_id" model="ir.ui.menu">
    <!-- Use the special many2many value syntax to add a child record,
         and the `ref()` method to resolve the group XML ID -->
    <field name="groups_id" eval="[(4,ref('my_new_group_id'))]"/>
</record>

You can find similar examples in the official OpenERP addons, such as the CRM module that makes the top-level Sales menu visible to some extra groups (l.48).

About This Community

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

Question tools

0 follower(s)

Stats

Asked: 8/27/13, 1:21 PM
Seen: 1516 times
Last updated: 3/16/15, 8:10 AM