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

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
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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 

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

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?

Câu trả lời hay nhất

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.  

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 10 24
4386
1
thg 12 23
2894
0
thg 9 23
2893
1
thg 10 24
3541
0
thg 2 22
3349