Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
16515 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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. 

Ảnh đại diện
Huỷ bỏ

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

Câu trả lời hay nhất
Check from Controller

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


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 8 19
10461
3
thg 7 25
2017
3
thg 5 25
3513
2
thg 6 25
4063
0
thg 6 21
2365