تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
19640 أدوات العرض

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

المنشورات ذات الصلة الردود أدوات العرض النشاط
5
سبتمبر 25
879
2
أغسطس 25
582
1
ديسمبر 23
3507
0
سبتمبر 23
3441
1
أكتوبر 24
3918