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.

19 lines
529 B

  1. # -*- coding: utf-8 -*-
  2. import json
  3. from odoo import api, fields, models
  4. from ..environment_checkup import dependencies
  5. from ..environment_checkup.runtime import display_data
  6. class Module(models.Model):
  7. _inherit = 'ir.module.module'
  8. dependency_checks = fields.Text(
  9. compute='_compute_dependency_checks'
  10. )
  11. @api.one
  12. def _compute_dependency_checks(self):
  13. checks = dependencies.get_checks_for_module_recursive(self)
  14. self.dependency_checks = json.dumps(display_data(self.env, checks))