Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Base Tier Validation
Entity: tier.validation
Compute Method: _compute_need_validation
| Inputs | Method | Outputs |
|---|---|---|
|
- for rec in self: - if isinstance(rec.id, models.NewId): - rec.need_validation = False - continue - tiers = ( - self.env["tier.definition"] - .with_context(active_test=True) - .search( - [ - ("model", "=", self._name), - ("company_id", "in", [False] + rec._get_company().ids), - ] - ) - ) - valid_tiers = any([rec.evaluate_tier(tier) for tier in tiers]) - rec.need_validation = ( - not rec.review_ids and valid_tiers and rec._check_state_from_condition() - ) |
|
