From 102c63aad3e1bd60bfc3f72767d1da896a60b856 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Fri, 2 Mar 2018 16:18:03 +0100 Subject: [PATCH] [9.0][IMP] base_tier_validation: filter out reviews not pending --- base_tier_validation/models/tier_validation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base_tier_validation/models/tier_validation.py b/base_tier_validation/models/tier_validation.py index d08e90ee2..fc97f0909 100644 --- a/base_tier_validation/models/tier_validation.py +++ b/base_tier_validation/models/tier_validation.py @@ -43,7 +43,9 @@ class TierValidation(models.AbstractModel): @api.model def _search_reviewer_ids(self, operator, value): reviews = self.env['tier.review'].search([ - ('model', '=', self._name), ('reviewer_ids', operator, value)]) + ('model', '=', self._name), + ('reviewer_ids', operator, value), + ('status', '=', 'pending')]) return [('id', 'in', list(set(reviews.mapped('res_id'))))] @api.multi