跳至內容
選單
此問題已被標幟
2 回覆
16469 瀏覽次數

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
8月 19
10395
3
7月 25
1988
3
5月 25
3466
2
6月 25
4024
0
6月 21
2331