Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

how to hide menus ?

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
viewmenucustomizationrightsmenuscustomi
5 Respuestas
53090 Vistas
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
Descartar
Haresh Kansara

https://youtu.be/zHPtb1SR8Sk

Avatar
Alcaline
Mejor respuesta

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
Descartar
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
Mejor respuesta

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
Descartar
Avatar
René Schuster
Mejor respuesta

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
Descartar
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
Mejor respuesta

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
Descartar
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 ?

¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
Report Customization using Odoo Studio v12
view report customization
Avatar
0
sept 19
3957
Access Rights and how to show Menu
menu access rights
Avatar
Avatar
1
jul 16
10037
Product - Kanban Item Edit
view kanban customization
Avatar
Avatar
Avatar
2
mar 15
11693
Weird side effect... (view, menu, action)
action view menu
Avatar
1
mar 15
4842
How to change Menu Sequence (Odoo 11) Resuelto
menu menuitem customization odoo11
Avatar
Avatar
Avatar
Avatar
3
abr 25
11947
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Sitio web hecho con

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