Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    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 Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & 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
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

How do I do to a normal user just see own records and a special user see all ?

Subscribe

Get notified when there's activity on this post

This question has been flagged
restrictionpermission
4945 Views
Avatar
Anabela Damas

Hi,

I've tried to do something like in the sale module with "see own leads" and "see all leads" but I didn't find group_sale_salesman_all_leads in other file then sale_security.xml so I did like this:

mymodule/security/ir.model.access.csv

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
acess_gestao_ideias1,gestao.ideias,model_gestao_ideias,group_gestao_ideias_system_manager,1,1,1,1
acess_gestao_ideias2,gestao.ideias,model_gestao_ideias,group_gestao_ideias_user,1,1,1,0
acess_gestao_ideias3,gestao.ideias,model_gestao_ideias,group_gestao_ideias_watcher,1,0,0,0
access_ir_property_ideias,ir.property.ideias,base.model_ir_property,group_gestao_ideias_user,1,1,1,1
acess_gestao_ideias19,radar.vigilancia,model_radar_vigilancia,group_gestao_ideias_user,1,0,0,0
acess_gestao_ideias4,categ.criterios,model_categ_criterios,group_gestao_ideias_user,1,0,0,0
acess_gestao_ideias5,criterios.avaliacao,model_criterios_avaliacao,group_gestao_ideias_user,1,0,0,0
acess_gestao_ideias6,registos.vigilancia,model_registos_vigilancia,group_gestao_ideias_user,1,0,0,0
acess_gestao_ideias7,accoes.tarefas,model_accoes_tarefas,group_gestao_ideias_user,1,0,0,0
acess_gestao_ideias8,registos.vigilancia,model_registos_vigilancia,group_gestao_ideias_user,1,0,0,0
acess_gestao_ideias9,radar.eventos.tipo,model_radar_eventos_tipo,group_gestao_ideias_user,1,0,0,0
acess_gestao_ideias10,gestao.notificacoes,model_gestao_notificacoes,group_gestao_ideias_user,1,0,0,0
acess_gestao_ideias11,criterios.avaliacao,model_criterios_avaliacao,group_gestao_ideias_user,1,1,1,0

acess_gestao_ideias12,categ.criterios,model_categ_criterios,group_gestao_ideias_system_manager,1,1,1,1
acess_gestao_ideias13,criterios.avaliacao,model_criterios_avaliacao,group_gestao_ideias_system_manager,1,1,1,1
acess_gestao_ideias14,registos.vigilancia,model_registos_vigilancia,group_gestao_ideias_system_manager,1,1,1,1
acess_gestao_ideias15,accoes.tarefas,model_accoes_tarefas,group_gestao_ideias_system_manager,1,1,1,1
acess_gestao_ideias16,registos.vigilancia,model_registos_vigilancia,group_gestao_ideias_system_manager,1,1,1,1
acess_gestao_ideias17,radar.eventos.tipo,model_radar_eventos_tipo,group_gestao_ideias_system_manager,1,1,1,1
acess_gestao_ideias18,gestao.notificacoes,model_gestao_notificacoes,group_gestao_ideias_system_manager,1,1,1,1
acess_gestao_ideias20,radar.vigilancia,model_radar_vigilancia,group_gestao_ideias_user,1,1,1,1

mymodule/security/mymodule_security.xml

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

        <record model="ir.module.category" id="module_category_group_gestao_ideias">
            <field name="name">Gestão Ideias</field>
            <field name="description">Something...</field>
            <field name="sequence">20</field>
        </record>

        <record model="res.groups" id="group_gestao_ideias_user">
            <field name="name">User</field>
            <field name="comment">Acesso aos Gestão de Ideias as proprias</field>
            <field name="category_id" ref="module_category_group_gestao_ideias"/>
        </record>

        <record model="res.groups" id="group_gestao_ideias_manager">
            <field name="name">Manager</field>
            <field name="comment">Acesso aos Gestão de Ideias</field>
            <field name="category_id" ref="module_category_group_gestao_ideias"/>
            <field name="implied_ids" eval="[(4, ref('gestao_ideias.group_gestao_ideias_user'))]"/>
        </record>

        <record model="res.groups" id="group_gestao_ideias_system_manager">
            <field name="name">System Manager</field>
            <field name="comment">Acesso aos Gestão de Ideias</field>
            <field name="category_id" ref="module_category_group_gestao_ideias"/>
            <field name="implied_ids" eval="[(4, ref('gestao_ideias.group_gestao_ideias_manager'))]"/>
            <field name="users" eval="[(4, ref('base.user_root'))]"/>
        </record>


        <record model="res.groups" id="group_gestao_ideias_watcher">
            <field name="name">Watcher</field>
            <field name="comment">Acesso aos Gestão de Ideias</field>
            <field name="category_id" ref="module_category_group_gestao_ideias"/>
        </record>
    </data>
</openerp>

Probably something is missing?

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

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

Sign up
Related Posts Replies Views Activity
Admin Access Error Solved
permission
Avatar
Avatar
1
Feb 18
4889
set permission to admin
permission
Avatar
Avatar
1
Mar 15
6407
How do I narrow a search in res.user to users that belong to the same group I do?
users many2one search restriction permission
Avatar
Avatar
1
Mar 15
8952
How to restrict the contacts as user-only contacts in CRM and the Contact App
restriction Contact
Avatar
Avatar
1
Nov 25
314
How to restrict a user from viewing some certain contact in Odoo 17 Solved
contact restriction
Avatar
Avatar
Avatar
3
Dec 24
5902
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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