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

I create an dir named "my_modules" which  I want to save my own modules;

and now I want to add this dir into "addons_path" for all databases;

I do as below:

 odoo.py --save --config myodoo.cfg --stop-after-init (then edit myodoo.cfg and edit it:  addons_path = ~/odoo-dev/my_modules,~/odoo-dev/odoo/openerp/addons,~/odoo-dev/odoo/addons)

then : ~/odoo-dev/odoo/odoo.py -c ~/odoo-dev/myodoo.cfg --stop-after-init -u base  

after that I run :~/odoo-dev/odoo/odoo.py , I find I still can;t add my own dir.

How shall I do that?

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

Add the path to your openerp-server.conf file and execute Odoo by specifying the conf file as parameter. I would run Odoo as a service anyway (systemd or upstart, if you are using Ubuntu).

Ảnh đại diện
Huỷ bỏ
Tác giả

thank you.

I check this and I just find file "openerp-server" in '../odoo' rather than 'openerp-server.conf';

I want to start "odoo" just by ".../odoo/odoo,py" and my own dir "my_modules" will be auto loaded;not each time specifying some certain file as paramete, shall I?

Please locate the openerp-server.conf file in your installation (in an Ubuntu install you'll find it in /etc/odoo/openerp-server.conf). There you can add your custom addons path. You may then start odoo with the parameter -c path/to/your/openerp-server.conf

Tác giả

Ok

thank you!

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

dear vx2008

 you can use this command to start the server what ever you want to put 
"my_modules"  any way:
./odoo.py --addons=your pure addons path,"my_modules" path.
I hope i helped you.

Ảnh đại diện
Huỷ bỏ
Tác giả

hey Adam, thank you for your advice and I have a try;

yes, odoo will load the modules which were saved in "my_modules" when I run the code:"./odoo.py --addons=your pure addons path,"my_modules" path."; but next time I type "./odoo.py", the modules in "my_modules" will never be loaded; In the fact I want to do some setting, and then each time type "./odoo.py" to lead these modules.

Bài viết liên quan Trả lời Lượt xem Hoạt động
addons_path issue Đã xử lý
2
thg 10 16
7569
4
thg 7 25
348
1
thg 12 23
3227
0
thg 9 23
3125
1
thg 10 24
3731