Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

how to hide menus ?

Odebírat

Get notified when there's activity on this post

This question has been flagged
viewmenucustomizationrightsmenuscustomi
5 Odpovědi
53061 Zobrazení
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
Zrušit
Haresh Kansara

https://youtu.be/zHPtb1SR8Sk

Avatar
Alcaline
Nejlepší odpověď

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
Zrušit
mohsel
Autor

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
Nejlepší odpověď

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
Zrušit
Avatar
René Schuster
Nejlepší odpověď

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
Zrušit
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
Autor

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
Nejlepší odpověď

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
Zrušit
mohsel
Autor

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!

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
Report Customization using Odoo Studio v12
view report customization
Avatar
0
zář 19
3948
Access Rights and how to show Menu
menu access rights
Avatar
Avatar
1
čvc 16
10031
Product - Kanban Item Edit
view kanban customization
Avatar
Avatar
Avatar
2
bře 15
11689
Weird side effect... (view, menu, action)
action view menu
Avatar
1
bře 15
4838
How to change Menu Sequence (Odoo 11) Vyřešeno
menu menuitem customization odoo11
Avatar
Avatar
Avatar
Avatar
3
dub 25
11931
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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