这是stackflow里的解答
There is two way to add custom folder to the odoo addons path:
First the easy one
to edit the configuration file of the odoo server and locate the line starting with addons_path and appending comma followed by the absolute path to the directory you want to add to the addons path,
so if the custom addons directory is /home/user_name/new-addons and the path of your odoo instance is /home/user_name/odoo the line should be like this
addons_path = /home/user_name/odoo/openerp/addons,/home/user_name/odoo/addons,/home/user_name/new-addons
The second
is when calling the odoo.py script and pass the --addons-path command line argument to it like this
$ odoo/odoo.py --addons-path="/home/user_name/odoo/openerp/addons, /home/user_name/odoo/addons, /home/user_name/new-addons"
in this case you must not only pass the path to your custom addons directory but also the paths of the base addons (odoo/openerp/addons) and the core addons directory (odoo/addons) and if your put space after the commas between the paths you will need to quote the list of directories.
here you can use relative paths but it is relative to the place where you call the odoo.py file .
if you use the second way the custom addons directory has to have at least one working module in it or any directory with init.py and openerp.py files inside it or it will give you “does not seem to a be a valid Addons Directory” error
see section : Configuring the addons path in the “Odoo Development Cookbook” book
https://stackoverflow.com/questions/38670514/how-to-add-a-custom-folder-to-odoo-py-addons-addons
具体解决步骤
001、odoo-bin: error: option –addons-path: The addons-path ‘custom-addons’ does not seem to a be a valid Addons Directory!
此报错因custom-addons中没有任何模块,可以添加模块,或加入基础代码,如进入custom-addons目录
mkdir my_module
touch my_module/__init__.py
vim my_module/__manifest__.py
# 添加如下内容并保存
{'title':'My module'}