콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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

아바타
취소
베스트 답변

Hi Rob,

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

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

Thanks,

아바타
취소
작성자

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

베스트 답변

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

아바타
취소
베스트 답변

si there any solution for this ?

아바타
취소
베스트 답변

use this app to install the module after installation restart server

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

아바타
취소
관련 게시물 답글 화면 활동
1
8월 21
2362
1
4월 21
3810
0
4월 21
2321
2
5월 24
2217
1
6월 23
3127