Custom Menu for New Module – Odoo

Thanks to Odoo’s hugely flexible architecture, all too often, we find ourselves programming new modules for business processes. In a recent project for developing new features to accomodate a business model for a client, where an existing Odoo-Module had to be extended, and at the same time a new module had to be developed, we faced challenges in exposing new menu-items to non-admin users.

Actually its straight forward when the module is extending some existing group or model. The real pain comes when we have completely different module. e.g. we had categories module which was extending res_parterners_category hence was showing in the sidebar-menu without a problem. But for a complete new content-management (CMS) module, called advertiseprofile, written from scratch, the menus wouldn’t show!

To solve this we tried every group, permissions etc. at first. The solution however was to include a proper security model for our new module, starting from the security folder and files which got created during scaffolding process.

To get the process started modify 3 files:


Taking example of our module – advertiseprofile below is the code snippets.

Add your security file details in “data” attribute.

 'data' : [


Add below lines to this file, making sure to change the values as per your module information:

<?xml version="1.0"?>
        <record model="ir.module.category" id="advertiseprofile_category">
            <field name="name">Advertiseprofile</field>
            <field name="sequence">16</field>
        <record model="res.groups" id="group_advertiseprofile_user">
            <field name="name">Advertiseprofile User</field>
            <field name="category_id"  ref="advertiseprofile_category"/>
        <record model="res.groups" id="group_advertiseprofile_manager">
            <field name="name">Advertiseprofile Manager</field>
            <field name="implied_ids" eval="[(4, ref('advertiseprofile.group_advertiseprofile_user'))]"/>
            <field name="category_id"  ref="advertiseprofile_category"/>
        <!-- Record Rule.. -->    
        <record model="ir.rule" id="rule_advertiseprofile_adprofiles">
            <field name="name">Advertiseprofile Profiles</field>
            <field name="model_id" ref="model_advertiseprofile_adprofiles"/>
            <field name="domain_force"></field>
            <field name="groups" eval="[(4, ref('group_advertiseprofile_user'))]"/>
        <record model="ir.rule" id="rule_advertiseprofile_adstatinfo">
            <field name="name">Advertiseprofile Statistics</field>
            <field name="model_id" ref="model_advertiseprofile_adstatinfo"/>
            <field name="domain_force"></field>
            <field name="groups" eval="[(4, ref('group_advertiseprofile_user'))]"/>



​Once your module is configured properly then, you will see new “Application”​ of your module. See custom-module-application.png.
Similarly it creates groups under GROUPs. See custom-module-group.png

nebiz logo

Industriestraße 24b D-70565 Stuttgart – Deutschland

Tel. +49-711-7947-2394 Email.

© 2019 NEBIZ®

Über uns

NEBIZ® ist Ihr Partner für die Entwicklung erfolgreicher e-Commerce Lösungen. Wir liefern Ihnen leistungsfähige Technik und sinnvolle Beratung, damit Sie sich ganz auf Ihr Kerngeschäft konzentrieren können.

Neben unserem Umsetzung- und Programmierung-Know-how stehen wir Ihnen mit Online Marketing zur Seite.