Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Producție
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Why new menuitem dissapear with a user?

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
securityviewsv7__openerp__.py
3 Răspunsuri
6989 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
Imagine profil
Anabela Damas
Autor Cel mai bun răspuns

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
Imagine profil
Abandonează
Imagine profil
Jasad Moozhiyan
Cel mai bun răspuns

Hi,

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

2
Imagine profil
Abandonează
Imagine profil
Simplify it!
Cel mai bun răspuns

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
Imagine profil
Abandonează
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!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
Creating user groups that allow users to access several companies
security v7
Imagine profil
Imagine profil
1
feb. 25
8518
What is the different between col and colspan? Rezolvat
views v7
Imagine profil
Imagine profil
1
oct. 24
70335
What does the "no_open : True" widget option do in a view definition? Rezolvat
views v7
Imagine profil
Imagine profil
2
dec. 23
26785
How do I search by country_id in view? Rezolvat
views v7
Imagine profil
Imagine profil
1
oct. 21
10189
How to edit/consult one2many without popup?
views v7
Imagine profil
Imagine profil
1
mar. 15
7463
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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