İçereği Atla
Menü
Bu soru işaretlendi
4 Cevaplar
19432 Görünümler

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

Avatar
Vazgeç
En İyi Yanıt

Hi Rob,

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

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

Thanks,

Avatar
Vazgeç
Üretici

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

En İyi Yanı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

Avatar
Vazgeç
En İyi Yanıt

si there any solution for this ?

Avatar
Vazgeç
En İyi Yanıt

use this app to install the module after installation restart server

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

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Ağu 21
2221
1
Nis 21
3629
0
Nis 21
2166
2
May 24
2050
1
Haz 23
2993