Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

how to hide menus ?

Naroči se

Get notified when there's activity on this post

This question has been flagged
viewmenucustomizationrightsmenuscustomi
5 Odgovori
53064 Prikazi
Avatar
mohsel

I developped custom modules that inherit from existing modules (accountig, hr, etc..) and by installing those modules, their menus appear. so I would like to hide those menus (Accounting, Human resources) from the users with keeping the rights for the users on those modules, is it possible ? how can i do it ? 

1
Avatar
Opusti
Haresh Kansara

https://youtu.be/zHPtb1SR8Sk

Avatar
Alcaline
Best Answer

You can hide a menu using the groups in .xml:

   first create a new folder inside of your module name it as SECURITY then inside of it create and .xml file and put this one

    <record id="make_invisible" model="res.groups">

        <field name="name">Invisible</field>

    </record>

and then put the name of this .xml file in your

     _openerp_.py ->'update_xml' : ['Security/module_name.xml','module_contains_menus.xml']

after that in your menuitems add groups equals the id of your created xml file like this:
      

<menuitem name="menu1"
            id="base.menu_root"
            groups="make_invisible"
            sequence="80"/>

 

I hope this one will help.

4
Avatar
Opusti
mohsel
Avtor

Will this "delete" the menu only when i install the module ? and if it is so, will it be enabled if i uninstall the module ? Thanks again

ABU K

Is it required the csv file please explain step by step .How to create a security for a custom module.As per you code I can create only a field inside Access Rights tabs under users.No functionality

Pascal Tremblay

First shot! Great. Thanks!

Avatar
Kiran
Best Answer

Hello Everyone

Suppose i want to hide CRM menu so what i done. See the Code

1) create one file in security folder [security/security.xml​]

<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data noupdate="0">

<record id="make_invisible" model="res.groups">
    <field name="name">Show Crm Menu</field>
</record>
<record model="ir.ui.menu" id="crm.crm_menu_root">
    <field name="groups_id" eval="[(5,ref('make_invisible'))]"/>
</record>

</data>

</odoo>

2) then add menu in your custom created module in xml file 

<menuitem id="crm.crm_menu_root" name="CRM" groups="make_invisible"/>

3) then add the security files in __manifest__.py

'depends': ['base', 'crm'], 
'data': [
    'security/security.xml',
    'security/ir.model.access.csv',
],
'installable': True,
'auto_install': False,
'application': True,

I Hope i will help you

Thanks in Advanced

3
Avatar
Opusti
Avatar
René Schuster
Best Answer

Add a custom xml file to your custom modules and use the delete tag.

For example for the Human Resource menu item

<delete model="ir.ui.menu" id="hr.menu_hr_root"></delete>

 

Regards.

2
Avatar
Opusti
Ludo - 21South

mohsel asked if it was possible to hide the menu from a selection of people. Your solution permanently hides the menuitem from everyone, which is fine is most cases, but I think not in the case of the ts.

René Schuster

Maybe it's due to my english, but I think he wants the official menues to be hidden, while only his own menues are visible. Anyway, you are right, delete will permanently remove the menu items, not hide them.

mohsel
Avtor

Thanks René and Ludo, your are both right, in fact i will try to hide the menus, if it doesn't work, i will use René's proposition to delete them, i"ll just gonna have to be able te reinstall them

Avatar
Ludo - 21South
Best Answer

Yes this is possible. If you made the custom XML's with the <menuitem> tags as well, just add the the groups-attribute to that tag, like so:

<menuitem id="myitem" groups="hr.hr_manager"/>

This way, only users that belong to the hr_manager group defined in the HR module will be able to see the menu. 

You can alternatively also add your own groups in your module. The syntax would not differ much, but you would not point to the original HR module for the group name.

0
Avatar
Opusti
mohsel
Avtor

Thank you for your answer, what i understood, in orther to hide the hr and accounting menus i will have to surcharge the xml declaration for the menus hr and accounting ?

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Prijavi
Related Posts Odgovori Prikazi Aktivnost
Report Customization using Odoo Studio v12
view report customization
Avatar
0
sep. 19
3948
Access Rights and how to show Menu
menu access rights
Avatar
Avatar
1
jul. 16
10031
Product - Kanban Item Edit
view kanban customization
Avatar
Avatar
Avatar
2
mar. 15
11689
Weird side effect... (view, menu, action)
action view menu
Avatar
1
mar. 15
4838
How to change Menu Sequence (Odoo 11) Solved
menu menuitem customization odoo11
Avatar
Avatar
Avatar
Avatar
3
apr. 25
11931
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now