Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
19650 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ

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

Tác giả

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

Tác giả Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ

glad to hear you figured it out.

yeah atleast you found your mistake by yourself

Bài viết liên quan Trả lời Lượt xem Hoạt động
5
thg 9 25
881
2
thg 8 25
586
1
thg 12 23
3508
0
thg 9 23
3445
1
thg 10 24
3920