Reputation: 401
I want to inherit a form from another custom module without depends but It need to be check if that module is installed or model is existed before inherit it. I researched many docs but not found any solution regards so pls help me how can I do this
Upvotes: 6
Views: 5111
Reputation: 61
Check whether the module has been installed, and is in an installed state by querying against ir.module.module
:
bokeh = self.env['ir.module.module'].search([('name', '=', 'module_name')])
if not bokeh or bokeh.state != 'installed':
raise UserError(_('...'))
Upvotes: 6
Reputation: 1548
You can know if a module is installed checking the state
field in the ir_module_module
table.
I hope this help you!
Upvotes: 10
Reputation: 980
To check module installed in odoo or not follow below step :
Login with Administrator access user > Click on Apps Menu from the Top Bar > You can search module with name or Apply Filter Installed
Upvotes: 0