You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
510 B

  1. # Copyright (C) 2019-Today: GRAP (<http://www.grap.coop/>)
  2. # @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from odoo import api, SUPERUSER_ID
  5. def analyse_installed_modules(cr, registry):
  6. with api.Environment.manage():
  7. env = api.Environment(cr, SUPERUSER_ID, {})
  8. installed_modules = env['ir.module.module'].search(
  9. [('state', '=', 'installed')])
  10. installed_modules.button_analyze_code()