تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4 الردود
19445 أدوات العرض

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
أغسطس 21
2227
1
أبريل 21
3637
0
أبريل 21
2175
2
مايو 24
2060
1
يونيو 23
3003