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

[v8) How can I create a product for a child company?

Subscribe

Get notified when there's activity on this post

This question has been flagged
1 Reply
4234 Views
Avatar
gunnar

I have a multi-company setup where odoo users are users of the mother.

I can create aproduct for mother (which I am a user of) but when I want to create a product for the child-company I get an acces error that says

Access Denied

The requested operation cannot be completed due to security restrictions. Please contact your system administrator.

(Document type: Product Template, Operation: write)

 

  • The child company is marked in the "allowed Companies" tags in >Settings>Users>my_user
  • "Multi Companies" is marked active in >Settings>Users>Usability ...
  • I am set up as manager in Warehouse, Sales, Purchases

any idea what the problem might be?

0
Avatar
Discard
Avatar
Zbik
Best Answer

Probably you have to fix the multi-company rule for products. Go to Settings>Technical>Security>Record Rules and find the rule named = Product multi-company. The default rule was wrong. So you change :

['|',('company_id','=',user.company_id.id),('company_id','=',False)]

for

['|','|',('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id]),('company_id','=',False)]

0
Avatar
Discard
gunnar
Author

not willingly. I also wouldn't know how to do that, nor can I find any entries as the one you posted here. The only thing I can relate to is "yes, there is a Model called "ir.rule" which has a filed company_id .... but that's about it. No idea beyond that. Can you be a little more specific about what you mean exactly by your answer (in a way that someone with no knowlaedge in coding nor python might be able to follow) I have a module installed that adds functionality to Multi-Company Setup [https://github.com/vrms/odoo_multi_company_extend] though, but I doubt that it takes away any default features.

Zbik

Answer updated.

gunnar
Author

thanks, that actually works. But ... I assume as soon I pull any updates from github now I am going to run into a conflict, wouldn't I? Also this seems to be a bug, so the best way would be to fix the bug in the official code I guess ... Can you tell me where this rule could be found in the actual code? Than I might be able to try and open an issue on github/odoo/odoo, fix this problem and make a PR. Also I saw about 90% of the rules realted to multi-company are the same. I guess the same kind of problem might occur with those as well, right?

gunnar
Author

do you think altering the 'faulty line' in /addons/product/security/product_security.xml would fix this on a code level? https://raw.githubusercontent.com/vrms/OCB/fix-multi-company-product-issue/addons/product/security/product_security.xml

gunnar
Author

tried to change the code in the product_security.xml but that doesn't fix the problem. If I look into the "Product multi-company" rule after I changed the xml code there is still the old code shown .

Zbik

1) security code - note that sources has flag noupdate="1" 2) odoo_multi_company_extend work correctly? without other issues? hmm..I doubt 3) definitions ir.rule rather, it is not a mistake to report as an issue on github/odoo/odoo, strongly depends on the need, they may be different (I have several installations with different settings)

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