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

Module: Key Performance Indicators

Entity: kpi.threshold.range

Compute Method: _compute_is_valid_range

Inputs Method Outputs
for obj in self:
            if obj.min_error or obj.max_error:
                obj.valid = False
                obj.invalid_message = (
                    "Either minimum or maximum value has "
                    "computation errors. Please fix them."
                )
            elif obj.max_value < obj.min_value:
                obj.valid = False
                obj.invalid_message = (
                    "Minimum value is greater than the maximum "
                    "value! Please adjust them."
                )
            else:
                obj.valid = True
                obj.invalid_message = ""

Back to entity