From e3078a61dcaac60a32c8861e5f54cc0fd7fdd031 Mon Sep 17 00:00:00 2001 From: mreficent Date: Thu, 21 Jun 2018 20:42:07 +0200 Subject: [PATCH] [FIX] base_tier_validation: _compute_need_validation (rec vs self) --- base_tier_validation/__manifest__.py | 2 +- base_tier_validation/models/tier_validation.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base_tier_validation/__manifest__.py b/base_tier_validation/__manifest__.py index 1f2df18a4..3a29e16ee 100644 --- a/base_tier_validation/__manifest__.py +++ b/base_tier_validation/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Base Tier Validation", "summary": "Implement a validation process based on tiers.", - "version": "10.0.1.0.0", + "version": "10.0.1.0.1", "category": "Tools", "website": "https://github.com/OCA/server-tools", "author": "Eficent, Odoo Community Association (OCA)", diff --git a/base_tier_validation/models/tier_validation.py b/base_tier_validation/models/tier_validation.py index ff7a4ea3b..2a5067ea7 100644 --- a/base_tier_validation/models/tier_validation.py +++ b/base_tier_validation/models/tier_validation.py @@ -82,8 +82,8 @@ 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]) - rec.need_validation = not self.review_ids and valid_tiers and \ + 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 @api.multi