|
@ -82,8 +82,8 @@ 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]) |
|
|
|
|
|
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 |
|
|
getattr(rec, self._state_field) in self._state_from |
|
|
|
|
|
|
|
|
@api.multi |
|
|
@api.multi |
|
|