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

Custom menu not visible to new user

By
Raza Ali
on 12/23/13, 3:34 AM 1,723 views

I have created a custom module and a menu structure for it as well.

I also added a security folder with group definitions and a permissions csv file.

After upgrading, I checked UI -> Menu Items as well as Groups and access rights and menus assigned to the groups.

They all seem perfect.

I created a new user, assigned one of the groups to it, and set a password.

When I logged in, the the menu did not appear. Please advise.

Code:

security/ir.model.access.csv

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_stock_picking_mymodule_manager,stock.picking,stock.model_stock_picking,group_mymodule_manager,1,1,1,1
access_stock_move_mymodule_manager,stock.move,stock.model_stock_move,group_mymodule_manager,1,1,1,1
access_stock_picking_mymodule_user1,stock.picking,stock.model_stock_picking,group_mymodule_user1,1,1,1,1
access_stock_move_mymodule_user1,stock.move,stock.model_stock_move,group_mymodule_user1,1,1,1,1
access_stock_picking_mymodule_user2,stock.picking,stock.model_stock_picking,group_mymodule_user2,1,1,1,1
access_stock_move_mymodule_user2,stock.move,stock.model_stock_move,group_mymodule_user2,1,1,1,1
access_stock_picking_mymodule_user3,stock.picking,stock.model_stock_picking,group_mymodule_user3,1,1,1,1
access_stock_move_mymodule_user3,stock.move,stock.model_stock_move,group_mymodule_user3,1,1,1,1

security/mymodule_security.xml

<openerp> <data noupdate="0">

<record id="group_mymodule_user1" model="res.groups">
    <field name="name">MyModule User - Stage 1</field>
    <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
    <field name="category_id" ref="base.module_category_purchase_management"/>
</record>

<record id="group_mymodule_user2" model="res.groups">
    <field name="name">MyModule User - Stage 2</field>
    <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
    <field name="category_id" ref="base.module_category_purchase_management"/>
</record>

<record id="group_mymodule_user3" model="res.groups">
    <field name="name">MyModule User - Stage 3</field>
    <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
    <field name="category_id" ref="base.module_category_purchase_management"/>
</record>

<record id="group_mymodule_manager" model="res.groups">
    <field name="name">MyModule Manager</field>
    <field name="category_id" ref="base.module_category_purchase_management"/>
    <field name="implied_ids" eval="[(4, ref('group_mymodule_user1'))]"/>
    <field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>

</data> </openerp>

openerp.py

'update_xml': ['mymodule_view.xml','reports/report_view.xml', 'security/mymodule_security.xml', 'security/ir.model.access.csv'],

mymodule_view.xml

<menuitem name="My Module" id="base.menu_mymodule" sequence="10" groups="group_mymodule_user1"/>

<menuitem name="Arrivals" id="menu_mymodule_arrivals" parent="base.menu_mymodule" sequence="1" groups="group_mymodule_user1"/>

    <menuitem name="New Arrivals" id="menu_mymodule_arrivals_new" parent="menu_mymodule_arrivals" sequence="1" action="mymodule_arrivals_new" groups="group_mymodule_user1"/>

I created a new user (e.g. user1) and selected the "MyModule User - Stage 1" group for it.

I checked the group and it shows user1 as a user (along with administrator).

The Stage 1 group also correctly shows the menu and submenu rights.

But user1 is still unable to see the menu!

Please advise.

Thanks

I have the same problem. Did you manage to solve it?

Pau Ubach
on 9/28/14, 9:46 PM
0

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

deep
On 9/30/14, 9:01 AM

Have you provided access for your custom module "mymodule_arrivals" in CSV file?

An object permission, or menu permission (optional)  has to be given to a user...

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: 12/23/13, 3:34 AM
Seen: 1723 times
Last updated: 3/16/15, 8:10 AM