Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Why new menuitem dissapear with a user?

Subscriure's

Get notified when there's activity on this post

This question has been flagged
securityviewsv7__openerp__.py
3 Respostes
7001 Vistes
Avatar
Anabela Damas

Hi,

I create a new module that work well with admin user. When I create a new user the menuitem for my new user dissapear. Why?

My file ir.model.access.csv:

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_calculator_price,access_calculator_price,model_calculator_price,group_calculator_price,1,1,1,1

My file xx_security.xml:

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

    <record model="ir.module.category" id="model_calculator_price">
        <field name="name">Folha de Cálculo</field>
        <field name="description">Something...</field>
        <field name="sequence">20</field>
    </record>

    <record model="res.groups" id="group_calculator_price">
        <field name="name">Manager</field>
        <field name="comment">Acesso Folha de Cálculo</field>
        <field name="category_id" ref="model_calculator_price"/>
    </record>


</data>

</openerp>

My file xml with view:

...
<menuitem id="menu_bionutrigal_calc" name="Test" groups="base.group_user"/>

<menuitem id="menu_bionutrigal_calc2" name="Calculator" parent="menu_bionutrigal_calc" groups="base.group_user" ></menuitem>

<menuitem action="action_calculator_price" string="Calculator Data" id="menu_bionutrigal_calc3" parent="menu_bionutrigal_calc2" groups="base.group_user"></menuitem>
....

My new user don't see the menu with name Test. With admin user is possible add the permission for my new user:

image description

But when the menuitem dissapear when I enter in openerp with this user.

(I've tested the first two answers, and nothing happened... So I add the text below)

Probably I've some error in the xx_security.xml file or in __openerp__.py.... Because when I run the openerp I always have this warning:

  WARNING testes_infinite openerp.modules.loading: The model calculator.price has no access rules, consider adding one. E.g. access_calculator_price,access_calculator_price,model_calculator_price,,1,1,1,1

My __openerp__.py :

....
    'init_xml': ['security/xx_security.xml',
                 'security/ir.model.access.csv'],
    'update_xml': ['vi_infinitechoice_sequence.xml',
                    ],
    'data': ['security/vi_infinitechoice_security.xml','security/ir.model.access.csv'],
.....

Anyone helps me please?

0
Avatar
Descartar
Avatar
Anabela Damas
Autor Best Answer

I don't know what the problem was, but the version that is working is this: xx_security.xml:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data noupdate="0">
        <record model="ir.module.category" id="module_category_group_calc_user">
            <field name="name">Calculation data</field>
            <field name="description">Something...</field>
            <field name="sequence">20</field>
        </record>
        <record model="res.groups" id="group_calc_user">
            <field name="name">User</field>
            <field name="comment">Access to calculation sheet.</field>
            <field name="category_id" ref="module_category_group_calc_user"/>
        </record>
    </data>

ir.model.access.csv

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
acess_infinitechoices_calc,calculator.price,model_calculator_price,group_calc_user,1,1,1,1

in view:

<menuitem id="menu_bionutrigal_calc" name="Bionutrigal" />

<!-- Menu Secundario - Menu Secundário-->
<menuitem id="menu_bionutrigal_calc2" name="Calculator" parent="menu_bionutrigal_calc" ></menuitem>

<!-- SubMenu com uma action que indica o que faz ao clicar no "Calculator Data" -->
<menuitem action="action_calculator_price" string="Calculator Data" id="menu_bionutrigal_calc3" parent="menu_bionutrigal_calc2" ></menuitem>

Thanks for the answers, know it's fixed. Don't know if it is the best solution. I have some problem with security in openerp =S

0
Avatar
Descartar
Avatar
Jasad Moozhiyan
Best Answer

Hi,

Better you remove the group in menu. Then it will be available to all users.

2
Avatar
Descartar
Avatar
Simplify it!
Best Answer

Go to Settings>Technical>Menu Items and look for your menu, then check if Human Resources / Employee is on Group Table, or you can assign other user.

1
Avatar
Descartar
Ray Carnes

This is because you have assigned the group "base.group_user" to your menu, this is the XML ID for the group "Human Resources / Employee". If you want to use the group permissions in your security file, change "base.group_user" to "MODULE_NAME.group_calculator_price"

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

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

Registrar-se
Related Posts Respostes Vistes Activitat
Creating user groups that allow users to access several companies
security v7
Avatar
Avatar
1
de febr. 25
8538
What is the different between col and colspan? Solved
views v7
Avatar
Avatar
1
d’oct. 24
70369
What does the "no_open : True" widget option do in a view definition? Solved
views v7
Avatar
Avatar
2
de des. 23
26817
How do I search by country_id in view? Solved
views v7
Avatar
Avatar
1
d’oct. 21
10201
How to edit/consult one2many without popup?
views v7
Avatar
Avatar
1
de març 15
7479
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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