Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • 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
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

How can I allow access to specific views for a group?

Odoberať

Get notified when there's activity on this post

This question has been flagged
viewsmenuitemgroupspermissionsodoo11community
4 Replies
33030 Zobrazenia
Avatar
Daniel

Hello. I´m trying to allow access to a group of users that I created, but I can´t know how to give access rights.
I have a group maker /security/groups.security.xml with this code that works:

<odoo>
<data>

<record id="grupo_maestros" model="res.groups">
<field name="name">Grupo Maestros</field>
</record>
</data>
</odoo>

In other file, in /security/aula10.security.xml I have the specific records for rules:

<record id="regla_alumnos" model="ir.rule">
<field name="name">alumnos</field>
<field name="model_id" ref="model_aula10_alumno"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True" />
<field name="perm_unlink" eval="True" />
<field name="groups" eval="[(4,ref('grupo_maestros'))]"/>
</record>

And for the view aula10_alumno I added the group to menuitem:

<menuitem name="Alumnos" id="alumnos" groups="grupo_maestros" sequence="10" action="alumno_action"/>

and for the specific tree view:

<record model="ir.ui.view" id="alumno_tree_view">
<field name="name">alumno.tree.view</field>
<field name="model">aula10.alumno</field>
    <fieldname="groups_id"eval="[(4, ref('grupo_maestros'))]"/>
<field name="arch" type="xml">
<tree string="Alumnos">
<field name="foto_nino" widget="image" img_width="35" />
<field name="name"/>
<field name="primer_apellido"/>
<field name="segundo_apellido"/>
<field name="fecha_nacimiento"/>
<field name="lugar_nacimiento"/>
</tree>
</field>
</record>


The problem is that when I see from Odoo in the group, the menus, the views and rules appears, but i haven´t had
nothing in the access rights section.
I think this is the cause because the user "Trini", that is in "grupo_maestros", can´t see the "alumno" menuitem. I think if the access rights are empty, even having menus rights, the menu not appears.

Can you explain me how to give these access rights with code? I know that I can do the same via Odoo interface, but is important perform this by code.
Thanks for your help.


0
Avatar
Zrušiť
Sehrish

Groups and Access Rights in Odoo: http://learnopenerp.blogspot.com/2018/01/groups-and-access-rights-in-odoo.html

Avatar
Vignesh Pk
Best Answer

Under security folder you should create a csv file and give access right for that group like this

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

     access_project_project,project.project,project.model_project_project,group_project_developers,1,0,0,0

0
Avatar
Zrušiť
Avatar
Sehrish
Best Answer

The most significant area in Odoo/OpenERP is how to deal or manage users. Managing users and assigning groups or role is the key point in every business. In Odoo/OpenERP assigning role or group to the single user is made through Administrator. And its not a good practice to do so using login through admin and do some setting stuff like assigning groups to employee or users.

Get complete code and description: http://learnopenerp.blogspot.com/2018/01/groups-and-access-rights-in-odoo.html

0
Avatar
Zrušiť
Avatar
Hilar Andikkadavath
Best Answer

Have look here

http://www.odoo.yenthevg.com/creating-security-groups-odoo/

0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
hide menu to group even if granted access to menu model
menuitem groups permissions
Avatar
Avatar
Avatar
2
júl 23
7017
Custom code: My Menu is not appearing, even though I see the Menu Item is created Solved
views menuitem
Avatar
Avatar
1
sep 25
1022
Group access permissings wrong Solved
groups permissions
Avatar
Avatar
1
feb 23
3042
Set Field Permission for dynamically assigned group Solved
groups permissions
Avatar
Avatar
2
sep 19
5212
remove groups_id from view Solved
views groups
Avatar
Avatar
1
júl 19
11559
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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