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

New group in the sales category in odoo 17

Subscribe

Get notified when there's activity on this post

This question has been flagged
salecategorygroups17
2 Replies
2168 Views
Avatar
Enzo

I need to add a new group in the Sales category. I have seen that in the "sales_team" module the groups are like this:


<record id="base.module_category_sales_sales" model="ir.module.category">
<field name="description">Helps you handle your quotations, sale orders and invoicing.</field>
<field name="sequence">1</field>
</record>

<record id="group_sale_salesman" model="res.groups">
<field name="name">User: Own Documents Only</field>
<field name="category_id" ref="base.module_category_sales_sales"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="comment">the user will have access to his own data in the sales application.</field>
</record>

<record id="group_sale_salesman_all_leads" model="res.groups">
<field name="name">User: All Documents</field>
<field name="category_id" ref="base.module_category_sales_sales"/>
<field name="implied_ids" eval="[(4, ref('group_sale_salesman'))]"/>
<field name="comment">the user will have access to all records of everyone in the sales application.</field>
</record>

<record id="group_sale_manager" model="res.groups">
<field name="name">Administrator</field>
    <field name="comment">the user will have an access to the sales configuration as well as statistic reports.</field>
<field name="category_id" ref="base.module_category_sales_sales"/>
<field name="implied_ids" eval="[(4, ref('group_sale_salesman_all_leads')),
                (4, ref('mail.group_mail_template_editor'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>


So in my custom module I've tried adding the group to the Sales category like this:


<record id="user_channel" model="res.groups">
        <field name="name">User without channel</field>
        <field name="category_id" ref="base.module_category_sales_sales"/>
        <field name="implied_ids" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
        <field name="comment">User unable to view sales records with channel</field>
</record>


I see that my group is added to the category, but now the fields are no longer selectable, they are now all checkboxes. Is there a way I can add a group without losing the selection type so that I can only choose one group? 

0
Avatar
Discard
Avatar
Christoph Farnleitner
Best Answer

Generally speaking, groups show up as a drop down, when the implied group(s) (-> implied_ids) allow for a hierarchical structure.

As you can see in the example from sales_team, each new group implies its 'predecessor' - or, in other words, group_sale_salesman (User: Own Documents Only) is the lowest access rule possible. The next higher one, group_sale_salesman_all_leads (User: All Documents) essentially means 'everything group_sale_salesman can do/see + x'; Lastly, being a group_sale_manager (Administrator) allows for 'everything group_sale_salesman_all_leads can do/see (and therefore everything group_sale_salesman can do/see) + y'. Or, more visual:

group_sale_salesman
group_sale_salesman_all_leads
group_sale_manager


That being said, in your case you have user_channel (User without channel) imply permission of group_sale_salesman - which means it has the same implications as group_sale_salesman_all_leads which makes it unspecific (in a hierarchical sense), because there is no clear 'place' or 'position' for user_channel. Visually structured, your addition means

group_sale_salesman
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
user_channel
group_sale_salesman_all_leads
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
group_sale_manager

Depending on what you want to achieve, you will have to bring the group into a structure such as

Case A:

Sales:
group_sale_salesman
user_channel
group_sale_salesman_all_leads
group_sale_manager

or

Case B:

Sales:
group_sale_salesman
group_sale_salesman_all_leads
user_channel
group_sale_manager

or

Case C:

Sales:
group_sale_salesman
group_sale_salesman_all_leads
group_sale_manager
Extra Rights:
user_channel


This means, you will have to 

  • override the implied_ids either for group_sale_salesman_all_leads so it implies user_channel (Case A), or 
  • override the implied_ids either for group_sale_manager​ so it implies user_channel (Case B), or 
  • separate user_channel from the Sales Team groups completely and use it as a separate permission to enable per user (Case C)

Case C could still mean that group_sale_salesman_all_leads (for Case A) or group_sale_manager (for Case B) additionally implies user_channel.

0
Avatar
Discard
Avatar
Enzo
Author Best Answer

It was perfectly understood, I was able to solve it now, thank you very much!

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
Product-related documents at the end of the PDF quotation
pdf sale 17
Avatar
Avatar
Avatar
3
Mar 25
1845
hide category from user form, odoo v14
category groups v14
Avatar
0
Jan 23
809
override category_id on res.parnert Solved
partner sale groups
Avatar
Avatar
1
Jun 21
3320
How to add access rights of only user types category with my custom groups in xml
category groups erp res.groups v17
Avatar
0
Feb 24
1367
Use Category first for sale a product before choose the product. STUDIO APP
sales filter product sale category
Avatar
0
May 20
1590
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