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

Say I want to install a python library called opencv when I install my custom module in a new system, how can I do this automatically?

Basically I want to run


pip install opencv-python == 2.4.9

automatically when I install my module in a system not having opencv

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

Hi Rob,

You can define below key,value pair in __manifest__.py file:

'external_dependencies': {
   'python': ['opencv-python'],
}

Thanks,

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

This only checks whether the dependency is installed or not and prevents app from installing. It does not automatically install the dependency.

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

Hi,

Can you refer the blog below, Hope it can be achieved by using the hook

External Dependencies ,Pre Init Hook & Post Init Hook In Odoo
Regards

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

si there any solution for this ?

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

use this app to install the module after installation restart server

https://apps.odoo.com/apps/modules/14.0/pip_module/

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 21
2333
1
thg 4 21
3773
0
thg 4 21
2264
2
thg 5 24
2179
1
thg 6 23
3099