Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3 Відповіді
19635 Переглядів

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.

Аватар
Відмінити

@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.

Автор

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...

Автор Найкраща відповідь

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.

Аватар
Відмінити

glad to hear you figured it out.

yeah atleast you found your mistake by yourself

Related Posts Відповіді Переглядів Дія
5
вер. 25
878
2
серп. 25
581
1
груд. 23
3506
0
вер. 23
3440
1
жовт. 24
3917