From 77ee706cd2c8017d6701238a91c61ec3e3699849 Mon Sep 17 00:00:00 2001 From: Florent de Labarre Date: Thu, 4 Jul 2019 21:46:38 +0200 Subject: [PATCH] [FIX] base_tier_validation : singleton error --- base_tier_validation/models/tier_validation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base_tier_validation/models/tier_validation.py b/base_tier_validation/models/tier_validation.py index 97dd158..9d12c8f 100644 --- a/base_tier_validation/models/tier_validation.py +++ b/base_tier_validation/models/tier_validation.py @@ -88,7 +88,7 @@ class TierValidation(models.AbstractModel): for rec in self: tiers = self.env[ '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 \ getattr(rec, self._state_field) in self._state_from