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 to restrict users from seeing vendor details in POS V17`

Subscribe

Get notified when there's activity on this post

This question has been flagged
1 Reply
948 Views
Avatar
Ronny

Hello,

I want to restrict users from accessing venders details from POS screen but they need to give access to clients details.

0
Avatar
Discard
Avatar
Gracious Joseph
Best Answer

Restricting users from accessing vendor details in POS (Point of Sale) V17 while allowing access to client details can be managed through a combination of access rights, record rules, and slight modifications to the POS screen. Here's how you can achieve this:

1. Understand the Default POS Behavior

By default, the Point of Sale module uses the res.partner model for both vendors and customers (clients). To restrict access to vendor details specifically, you need to define rules that:

  • Distinguish vendors from customers.
  • Prevent the POS user from accessing vendor records.

2. Steps to Restrict Access to Vendor Details

A. Create a Security Group for POS Users

  1. Go to Settings > Users & Companies > Groups.
  2. Create a new group, e.g., POS Limited Access.
  3. Assign this group to the POS users who should have restricted access.

B. Add a Field to Identify Vendors

To distinguish vendors from customers, use the supplier_rank field on res.partner.

  • Vendors have supplier_rank > 0, while customers usually have customer_rank > 0.

C. Create a Record Rule

Define a record rule that restricts access to vendor records for the POS Limited Access group.

  1. Go to Settings > Technical > Security > Record Rules.
  2. Create a new rule:
    • Model: res.partner.
    • Rule Definition: Restrict access to non-vendor records:
      ['|', ('supplier_rank', '=', 0), ('supplier_rank', '=', False)]
      
    • Applies To: Check Read only.
    • Groups: Assign the rule to the POS Limited Access group.

This rule ensures that users in the POS Limited Access group can only see partners who are not vendors.

D. Assign the Group to POS Users

  1. Go to Settings > Users & Companies > Users.
  2. Assign the POS Limited Access group to the relevant users.

3. Restrict Vendor Access in the POS Interface

The above steps restrict access to vendor records at the backend level. However, in the POS interface, you may need to customize the displayed data to ensure vendor details are not accessible.

Customize POS to Filter Only Customers

  1. Filter Customer Records: Modify the models definition in the POS JavaScript to only load customers (customer_rank > 0).
    Example:
    /** @odoo-module **/
    
    import PosDB from 'point_of_sale.models';
    
    const PosModelSuper = PosDB.prototype.models;
    PosDB.prototype.models = PosModelSuper.map(model => {
        if (model.model === 'res.partner') {
            model.domain = [['customer_rank', '>', 0]];
        }
        return model;
    });
    
    • Place this code in a custom module or inject it into the POS initialization.
  2. Prevent Access to Vendor Details: If there are additional screens or buttons in POS leading to vendor details, ensure those buttons or views are hidden for users with the POS Limited Access group.

4. Test the Configuration

  1. As an Admin:
    • Log in as an admin and verify that all partner records (both vendors and customers) are accessible.
  2. As a Restricted User:
    • Log in as a POS user with the POS Limited Access group.
    • Check the following:
      • Vendors are not visible in partner lists or searches.
      • Customers are fully accessible.
  3. POS Interface:
    • Start a POS session and confirm that only customers are displayed in the customer search or list.

5. Optional Enhancements

A. Add a Filter in Partner Lists

To explicitly show only customers in the POS interface, add a filter button that automatically applies customer_rank > 0.

B. Restrict Vendor Access in Other Modules

If POS users also have access to modules like Purchases or Contacts, ensure similar record rules are applied there.

Conclusion

By implementing the above steps, you can effectively restrict POS users from accessing vendor details while still allowing access to customer details. Let me know if you need further guidance or code snippets for customization!

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
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