Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
19649 Tampilan

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
Buang

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

Penulis

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

Penulis Jawaban Terbai

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
Buang

glad to hear you figured it out.

yeah atleast you found your mistake by yourself

Post Terkait Replies Tampilan Aktivitas
5
Sep 25
881
2
Agu 25
586
1
Des 23
3508
0
Sep 23
3445
1
Okt 24
3919