Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Hazard Risk

Entity: mgmtsystem.hazard

Compute Method: _compute_risk

Inputs Method Outputs
  • probability_id
  • severity_id
  • usage_id
  • probability_id.value
  • severity_id.value
  • usage_id.value
for hazard in self:
            if hazard.probability_id and hazard.severity_id and hazard.usage_id:
                hazard.risk = _parse_risk_formula(
                    self.env.company.risk_computation_id.name,
                    hazard.probability_id.value,
                    hazard.severity_id.value,
                    hazard.usage_id.value,
                )
            else:
                hazard.risk = False

Back to entity