Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

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

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
1 Répondre
4244 Vues
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
Ignorer
Avatar
Zbik
Meilleure réponse

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
Ignorer
gunnar
Auteur

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
Auteur

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
Auteur

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
Auteur

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)

Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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