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

Hi everyone,

The addon I'm Working on Requires to Write Some files to the odoo addons path.Can anybody Tell me How to get it?

I'm working with odoo11

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

Hi,

You can get the addons from the python like this,

import odoo.tools as tools

ad_path = tools.config['addons_path']


Here, the addons path, ad_path will be in the  comma separated  string

Thanks

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

Thank you so much , This is what I was Looking for

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

For nightly 11: ./odoo/addons and ./addons

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

Is there any way to read by code?

sudo nano ./odoo/addons/account/models/account.py

It will help you.

Tác giả

Thank you for your help

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

Hi, I didn't get your question clearly. I think you need the path of the addons.

If you install odoo in ubuntu system, majorly the path is

cd /etc/odoo/addons/ and cd /etc/odoo/odoo/addons/

Consider you install odoo in a folder named odoo11. open that folder there is directly a folder "addons". in that file you can find your addons. and also odoo11-->odoo-->addons,

If you need to add custom addons just follow the link.

https://www.cybrosys.com/blog/how-to-install-custom-modules-in-odoo

Thanks

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

I want to read the the addons location as string.and I want to write some files on that directory using python.Hope you have seen my comment on the previous answer.

Ok fine. using Python you can create or write files in the directories.!

Tác giả

Thank you for trying to help

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 25
2844
2
thg 8 25
383
2
thg 8 25
846
4
thg 7 25
645
2
thg 1 25
9238