Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

Why my new menu option is not visible for non admin users?

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
2 Replies
10126 Rodiniai
Portretas
Juan Formoso Vasco

I've created a new module named event_extended, which depends on the module named event. In my module, I've created a class ee.diploma. I created a new menu option to access to the views of this projects:

<menuitem name="Diplomas"
            id="menu_action_event_diploma" parent="base.menu_event_main"
            action="action_event_diploma" sequence="11"
            groups="event.group_event_manager,event.group_event_user"/>

As you can see, I've set some groups to the menuitem: I copied them from other existing menuitem which was set on the event module code. I did this because I want my menu option to bevahe like that menuitem.

As I want to use the same user groups as the ones declared in the module event, I didn't create any XML file in the security folder. I've only created a CSV file (which I've included in the array data of __openerp__.py). This is my CSV:

id, name, model_id:id, group_id:id, perm_read, perm_write, perm_create, perm_unlink

access_ee_diploma, ee.diploma, model_ee_diploma, event.group_event_user, 1, 1, 1, 1

The problem is: I can't see the menu option if I'm logged as a normal user (it doesn't mind if my user belongs to event.group_event_manager or event.group_event_user).

Can anyone help me, please? I've seen several questions which ask the same as I do, and I've tried their answers with no result. There must be something I'm missing.

EDIT

The rows I write in my CSV are being ignored. I have the next structure in my module

event_extended
|_ controllers
|_ i18n
|_ report
|_ security
|_ static
|_ wizard
|_ __openerp__.py
... etc

And my __openerp__.py is:

{
    "name": "Extended Events",
    "version": "0.1",
    "depends": [
        "web",
        "event",
        "res_partner_extended",
    ],
    "author": "Juan Formoso <xxx@xxx.es>",
    "category": "Events",
    "description": """
    Later.
    """,
    'demo': [],
    'data': [
       'security/ir.model.access.csv',
       'event_view.xml',
       'event_registration_view.xml',
       'res_partner_view.xml',
       'wizard/add_partner_to_event_view.xml',
       'reports.xml',
    ],
    'installable': True,
}

0
Portretas
Atmesti
Ludo - 21South

If you got to your settings menu, in the event user group, is the menu defined? Also, under the access rules, is the line created that you made in your CSV? Just regular checks. I have experienced the same sort of error before but did not find a solution. Also, this might sound stupid, but did you try to remove the "parent" tag from the menu item? If you do, your menu item will appear in the top bar. If THAT occurs, then we have the exact same problem and I would be more than curious to find the solution as well.

Juan Formoso Vasco
Autorius

Thank you very much @Ludo! I did what you said, removed the parent tag and my menu item appears on the top bar, but once again, only for admin, not for non admin users.

Juan Formoso Vasco
Autorius

If I go to Settings -> Technical -> Security -> Access Controls List, I can't see the row I added in my CSV file. Why?

Ludo - 21South

Are you 100% sure that you added the CSV file to the __openerp__.py file of your module? Otherwise, the CSV contents might not be valid. Try adding a second line for the event manager group as well.

Juan Formoso Vasco
Autorius

The problem must be that I'm not adding the access rights properly, because I've just created a new record from the interface with the data of my CSV row, and now, it works. Is my CSV file wrong?

Juan Formoso Vasco
Autorius

Ok, I'll do it now!

Juan Formoso Vasco
Autorius

I added a second line in my CSV for event.group_event_manager with the same permissions, and it's beeing ignored too. I'm going to edit my question to show my __openerp__.py and module folder structure.

Ludo - 21South

Not quite sure if it makes a difference, but in my configurations the csv file is always the last file of the "update" column, not the "data" column. Also, as Aitor mentioned you should use commas, but my assumption is that you just used those here to clarify what was filled in?

Juan Formoso Vasco
Autorius

Ok, I've been said to remove the update_xml and use data instead (I'm working on v7). But I'm having the same problem. I'm not using slashes (I've only written them here to show my CSV content). I copied a CSV from other module, opened and modified it with LibreOffice.

Portretas
Aitor Bouzas
Best Answer

Hi Juan,

Try to use ',' (commas) instead of '/' (slashes) in your .csv file.

1
Portretas
Atmesti
Juan Formoso Vasco
Autorius

Thank you @Aitor! I didn't use slashes, I've only written them to show here the content of the CSV. I copied the CSV from other module, and then opened and modified it with LibreOffice. Could be that a problem?

Aitor Bouzas

Hi @Juan, It shouldn't be the problem. Anyway check the file with a plain text editor like (Linux) vi, nano or (Windows) notepad++, notepad itself...

Juan Formoso Vasco
Autorius

Thank you very much @Aitor!!! Sorry for the delay, I was on a holiday, but I've started the day opening the csv with nano and there were semicolons instead of commas! I changed them and now it's working! :)

Portretas
Ivan
Best Answer

I would do @Ludo's advice to remove the parent tag first. That will inherently test whether your access rules and menu item access are in order. If you can't see the menu without parent, then you need to check the access rules, etc. If it appears, check on the groups of all the parent menus, starting from base.menu_event_main. The user need to have access to all parent menus (if there is no group, then it is accessible to all users).

0
Portretas
Atmesti
Juan Formoso Vasco
Autorius

Thank you @Ivan! I removed the parent tag, and the behaviour is exactly the same, except for my menu item is now on the top bar. I can only see it if I am logged as an admin. I've created the CSV with only one line (the one I posted earlier). And I guess I shouldn't create any XML files in security folders because I only want to use the ones declared in the security folder of the module which my module depends on. Am I right? Which could be the problem?

Ivan

As @Aitor had mentioned, are you using '/' instead of ','? You need to use ',' as separator. You can group text that is to be read as one column with double quotes. Also, you are mixing the use of update_xml and data. Not sure how it would turn out, but the sequence of data loading is important. I would advise that you choose one between update_xml or data.

Juan Formoso Vasco
Autorius

Thank you @Ivan! Ok, I've removed the update_xml and use data instead, I've edited the code above. But I'm having the same problem. I'm not using slashes (I've only written them here to show my CSV content). I copied a CSV file from other module, opened and modified it with LibreOffice.

Ivan

@Juan, if you can get hold of the log when you install or update the module, it would be helpful. It would be better if the log is set to the debug or greater level (debug_rpc, debug_rpc_answer, etc.)

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

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

Registracija
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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