This question has been flagged
4 Replies
27085 Views

Hi everybody, I have created the directory custom-addons under  home/ralph/odoo-dev

I tried to run the below command in Ubuntu terminal:

$ cd ~/odoo-dev
$ ./odoo/odoo-bin -d todo --addons-path="custom-addons,odoo/addons" --save


However, it returns the error below:

Usage: odoo-bin [options]
odoo-bin: error: option --addons-path: the path 'custom-addons' is not a valid addons directory

I tried many different ways, but to no avail. Can anyone give some guidance? Thanks

My Odoo version: 13; Ubuntu 19
Avatar
Discard
Best Answer

Hi Yuen,

Usually you add them in the config file itself instead of passing it along but both will work.
For example if you have an Odoo installed under /odoo13 and you have a custom path under /odoo13/custom/addons/some-repository you would do this in the config file:

addons_path=/odoo13/custom/addons/some-repository,/odoo13/custom/addons/another-repository

The same path should work in the terminal too. So:

./odoo-bin --addons-path=/odoo13/custom/addons/some-repository

Regards,
Yenthe

Avatar
Discard
Best Answer

Hi,
For setting up custom addons in path your server, you can follow this video explaining the same:  How To Setup Custom Addons Path In Odoo Server

Thanks

Avatar
Discard
Best Answer

I'm facing the same problem but I need another solution Yenthe 

Your way will work because both folders under odoo13 folder

But I need to make addons folders out odoo13 folder, I need it to be shared between more than one user to make one addons directory for more than one instance in the same time

I created a folder by the root user so he is the owner and I make group (sudo= which includes users of installed instances) is the owner group

Also I gave the folder and its sub-folders 775 permission

But unfortunately after uploading the module and restarting odoo service, it doesn't appear 

Avatar
Discard

is odoo user is the owner of this directory ?

Thanks for your reply Mate .. Appreciate
as I told in the question
I made group (sudo= which includes users of the installed instances) is the owner group
but at user level, the root is the owner of the folder, because I can not make two odoo users are the owner

also I tried to make this directory the addons directory of one instance, so I gave the ownership to the odoo user and odoo group as usual
but it doesn't work
untill now, it seems that the custom addons folder should be inside the odoo folder, if out of the odoo folder it will not read the module
how to solve this?

Best Answer

I faced the same problem. In my case, it was because the folder was empty. I didn't created the first module with the minimum file (the "__manifest__.py") in the module folder.  

Avatar
Discard