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

We are trying to develop a new type of navigation page. But here we need to be able to detect as to which modules are installed in OpenERP.

How can we detect them?

الصورة الرمزية
إهمال
أفضل إجابة

In your custom code you can just write down the following code to find out the installed modules.

    installed_module_ids = self.pool.get('ir.module.module').search(cr,uid,[('state','=','installed')])

It will give you ids of installed modules. Then after you can use read or browse to get another details of those modules. 

الصورة الرمزية
إهمال

We can restrict the search: is_crm_installed = self.pool.get('ir.module.module').search(cr,uid,[('state','=','installed'), ('name','=','crm'])

أفضل إجابة
Check from Controller

is_gift_card_installed = request.env['ir.module.module'].search([('state', '=', 'installed'), ('name', '=', 'website_sale_gift_card')])


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
أغسطس 19
10393
3
يوليو 25
1984
3
مايو 25
3464
2
يونيو 25
4019
0
يونيو 21
2326