Se rendre au contenu
Menu
Cette question a été signalée
3 Réponses
19631 Vues

I'm progressing through Daniel Reis's book Odoo Developement Essentials

https://www.packtpub.com/big-data-and-business-intelligence/odoo-essentials

I am attempting to build a basic module. In fact, it is an empty module, containing only what Daniel states is necessary (the __init.py__ and the __openerp.py__ files). When I start Odoo with the module's addon-path listed, Odoo says "option --addons-path: The addons-path 'custom-addons' does not seem to be a valid Addons Directory!"

I use the following to start Odoo:

 ~/odoo-dev$ odoo/odoo.py -d v8dev --addons-path="custom-addons"

Per Daniel's instructions, my Odoo directory structure is:

~/odoo-dev
    /odoo    # holds the Odoo v8 files
    /custom-addons
        /todo_app
            __openerp.py__
            __init__.py

__init.py__ is empty (used touch to create)

__openerp.py__ is

{ 
   'name': 'To-Do Application',    'description': 'Manage your personal tasks',    'author': 'Daniel Reis',    'depends': ['mail'],    'application: True, }

I compared my addons and modules structures to an Odoo Community Association addon. My directory structure and file contents are syntactically the same.

Avatar
Ignorer

@Nick,
From what I understand you need to provide the full path to the 'custom-addons' directory. In my setup my custom addons are in the following directory:
/opt/odoo/custom/addons

Therefore i'd start the server as follows:

odoo/odoo.py -d v8dev --addons-path="/opt/odoo/custom/addons"

If you'd like to add other addons directories you just need to separate them by a comma:

odoo/odoo.py -d v8dev --addons-path="/opt/odoo/custom/addons,/opt/odoo/custom/OCA/product-attribute"

I hope it helps.

Auteur

The trouble is not related to my specification of path. I inserted an app from the Odoo Community Association adjacent to my Todo_app and the server started normally (albeit with tons of errors due to missing dependencies required by the copied in app). Still looking...

Auteur Meilleure réponse

Apologies to anyone reading this. After taking a break, I saw I had created one file as __openerp.py__ instead of the required __openerp__.py.

Avatar
Ignorer

glad to hear you figured it out.

yeah atleast you found your mistake by yourself

Publications associées Réponses Vues Activité
5
sept. 25
877
2
août 25
578
1
déc. 23
3505
0
sept. 23
3440
1
oct. 24
3916