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
You can know if a module is installed checking the state
field in the ir_module_module
table.
I hope this help you!
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(_('...'))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With