Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

Error "not a valid addons directory" [Closed]

By
Mogens Nielsen
on 8/8/13, 10:23 PM 4,646 views

The Question has been closed

by
Sudhir Arya (SA)
on 08/11/2013 07:04:29

I am trying to do something very basic here in removing the "manage database" link on the login page as described elsewhere. However when I try to add the path to my custom addon I get the error "does not seem to be a valid addons directory". So what constitutes a valid addons directory? I followed the description and added a base.xml to the static/src/xml/ folder and loaded the file in the __openerp__.py file so what else do i need prior to adding it to the path?

Thanks

2

Sudhir Arya (SA)

--Sudhir Arya (SA)--
10150
| 6 8 8
Ahmedabad, India
--Sudhir Arya (SA)--

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow

LinkedIn

Blog

Stackoverflow

Sudhir Arya (SA)
On 8/10/13, 12:20 PM

I think problem is with your given path for addons.

Addons is just like a normal folder which contains one or more modules. Whenever you put all your modules in one folder is called addons.

For example I have some modules named sale_extend, purchase_extend, my_custom_module and I put three of them in one folder named my_addons.

So my_addons is known as addons directory which I will include in my addons path.

In your case make sure the path of the folder you are giving is not a module but it must be a folder/addons which contains one or more module.

Hope this explanation will help you.

I think the last part of your comment might be the reason for the problem. I have purposefully put the addon in the same folder as all other addons in the hope the system would auto-detect it. When it didn’t I used the addons-path switch to add it but passed the folder to the module. It all comes down to operator error I am sure. I don’t have access to the system now but will look at it later. Thx

Mogens Nielsen
on 8/10/13, 1:41 PM
1
joseph d'souza
On 8/9/13, 1:11 AM

I think you have put xml file wrong way in __openerp__ file you must put all xml in : "update_xml":[],

Exmple for openerp.py file : { "name" : "Products & Pricelists", "version" : "1.1", "author" : "Open", "category" : "Generic Modules/Inventory Control", "depends" : ["base", "account"], "init_xml" : [], "demo_xml" : ["product_demo.xml"], "update_xml" : ["product_data.xml","product_report.xml", "product_wizard.xml","product_view.xml", "pricelist_view.xml"], "installable": True, "active": True }

This file must contain a Python dictionary with the following values:

name

The (Plain English) name of the module.

version

The version of the module.

description

The module description (text).

author

The author of the module.

website

The website of the module.

license

The license of the module (default:GPL-2).

depends

List of modules on which this module depends. The base module must almost always be in the dependencies because some necessary data for the views, reports, ... are in the base module.

init_xml

List of .xml files to load when the server is launched with the "--init=module" argument. Filepaths must be relative to the directory where the module is. OpenERP XML File Format is detailed in this section.

update_xml

List of .xml files to load when the server is launched with the "--update=module" launched. Filepaths must be relative to the directory where the module is. OpenERP XML File Format is detailed in this section.

installable

True or False. Determines if the module is installable or not.

active

True or False (default: False). Determines the modules that are installed on the database creation.
0
Mogens Nielsen
On 8/9/13, 11:25 PM

I did a restart of the machine and tried running the addons-path again and it completed without errors. Though successful at adding the path I wasn't at getting the server to actually load the addon.

Since this is a lot of trouble for a small change on a test system I have opted for the incorrect approach of modifying the original file instead.

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 8/8/13, 10:23 PM
Seen: 4646 times
Last updated: 11/20/15, 6:34 AM