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
    • Guest House
    • Distributeur de boissons
    • Hotel
    Real Estate
    • Real Estate Agency
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consulting
    • Accounting Firm
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Metal
    • Furnitures
    • Food
    • 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
    • Solar Energy Systems
    • Cordonnier
    • Services de nettoyage
    • HVAC Services
    Others
    • Nonprofit Organization
    • 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

Is the security "section" required in a new module ?

S'inscrire

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

Cette question a été signalée
securityaction.rulerulesgroups
1 Répondre
16481 Vues
Avatar
Anabela Damas

Hi,

I've created a new module and everything was working fine when I were just working with the admin user.

Now I've created a new user with all the rights and access that the user admin, but when I log in with this user my new module isn't visible. And my module is connected to Sales Quotation and when I try to access one quotation I get this error:

 WARNING testes17May openerp.addons.base.ir.ir_model: Access Denied by ACLs for operation: read, uid: 5, model: calculator.price
2013-05-17 14:18:50,479 4509 ERROR testes17May openerp.netsvc: Access Denied
Sorry, you are not allowed to access this document. Please contact your system administrator if you think this is an error.
(Document model: calculator.price)
Traceback (most recent call last):
  File "/opt/openerp-7.0/openerp/netsvc.py", line 289, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/openerp-7.0/openerp/service/web_services.py", line 614, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp-7.0/openerp/osv/osv.py", line 169, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/openerp-7.0/openerp/osv/osv.py", line 125, in wrapper
    raise except_osv(inst.name, inst.value)
except_osv: (u'Access Denied', u'Sorry, you are not allowed to access this document. Please contact your system administrator if you think this is an error.\n\n(Document model: calculator.price)')

How do I fix this?

Is with the folder mymodule/security and the two files inside of it or is another way to do it?

Thanks

I've made the security folder with: mymodule/security/calc_security.xml:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data noupdate="0">
        <record model="res.groups" id="group_calc_user">
            <field name="name">User</field>
            <field name="comment">To show calculation sheet.</field>
            <field name="category_id" ref="module_category_group_calc_user"/>
        </record>
        <record model="ir.module.category" id="module_category_group_calc_user">
            <field name="name">User</field>
            <field name="description">Something...</field>
            <field name="sequence">20</field>
        </record>
    </data>
</openerp>

mymodule/__openerp__.py:

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
acess_infinitechoices_calc,calculator.price,model_calculator_price,group_calc_user,1,1,1,1

mymodule/security/ir.model.access.csv:

...
    'data_xml' : ['security/calc_security.xml','security/ir.model.access.csv'],
...

With my new user I still can't see my new module. What am I doing wrong? In this file the records were in a bad order: mymodule/security/calc_security.xml:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data noupdate="0">
        <record model="ir.module.category" id="module_category_group_calc_user">
            <field name="name">User</field>
            <field name="description">Something...</field>
            <field name="sequence">20</field>
        </record>
        <record model="res.groups" id="group_calc_user">
            <field name="name">User</field>
            <field name="comment">To show calculation sheet.</field>
            <field name="category_id" ref="module_category_group_calc_user"/>
        </record>
    </data>
</openerp>

Now is OK! Thanks for your help Daniel Reis.

0
Avatar
Ignorer
Avatar
Daniel Reis
Meilleure réponse

The admin builtin user is special, because it bypasses the ACL security checks. That's why you get security errors when you try with a new user that has exactly the same security groups as admin.

The solution is to add to your project a csv file to add permissions to groups on your new models. You can look into any official module to find an example.

1
Avatar
Ignorer
Anabela Damas
Auteur

Hi, I've updated my question with the code that I try to do by looking at the other modules, but I still can't see my new module with other users... do you know what am I doing wrong? Obrigada =)

Daniel Reis

To troubleshoot, you could use a standard res.group or try to define the permissions manually, through the Settings menus.

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
Publications associées Réponses Vues Activité
How to create rule to display only subordinates leave records in openerp
security rules groups
Avatar
Avatar
1
mars 15
8419
Can I create ir.rule that lets groups have only specific permissions based on state. Résolu
security rules groups v14
Avatar
Avatar
Avatar
2
oct. 21
8504
odoo[v8] rules
security rules groups odooV8
Avatar
Avatar
1
juil. 15
4908
How do I create a group and rules for Hr?
security hr rules groups hr_employee
Avatar
Avatar
1
août 24
2640
Odoo Security group
security rules groups Community OdooV13
Avatar
0
juin 22
3012
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