Browse Source

[FIX] base_tier_validation : singleton error

12.0^2
Florent de Labarre 5 years ago
committed by OCA-git-bot
parent
commit
77ee706cd2
  1. 2
      base_tier_validation/models/tier_validation.py

2
base_tier_validation/models/tier_validation.py

@ -88,7 +88,7 @@ class TierValidation(models.AbstractModel):
for rec in self: for rec in self:
tiers = self.env[ tiers = self.env[
'tier.definition'].search([('model', '=', self._name)]) 'tier.definition'].search([('model', '=', self._name)])
valid_tiers = any([self.evaluate_tier(tier) for tier in tiers])
valid_tiers = any([rec.evaluate_tier(tier) for tier in tiers])
rec.need_validation = not rec.review_ids and valid_tiers and \ rec.need_validation = not rec.review_ids and valid_tiers and \
getattr(rec, self._state_field) in self._state_from getattr(rec, self._state_field) in self._state_from

Loading…
Cancel
Save