Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

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

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
2 Besvarelser
10132 Visninger
Avatar
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
Avatar
Kassér
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
Forfatter

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
Forfatter

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
Forfatter

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
Forfatter

Ok, I'll do it now!

Juan Formoso Vasco
Forfatter

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
Forfatter

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.

Avatar
Aitor Bouzas
Bedste svar

Hi Juan,

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

1
Avatar
Kassér
Juan Formoso Vasco
Forfatter

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
Forfatter

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! :)

Avatar
Ivan
Bedste svar

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
Avatar
Kassér
Juan Formoso Vasco
Forfatter

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
Forfatter

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!

Tilmeld dig
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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