Browse Source

Merge pull request #20 from Eficent/11.0-base_tier_validation-can_review

[11.0][base_tier_validation] add 'can_review'
pull/30/head
Jordi Ballester Alomar 6 years ago
committed by GitHub
parent
commit
39871e0492
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      base_tier_validation/models/tier_validation.py

6
base_tier_validation/models/tier_validation.py

@ -33,6 +33,12 @@ class TierValidation(models.AbstractModel):
compute="_compute_reviewer_ids",
search="_search_reviewer_ids",
)
can_review = fields.Boolean(compute="_compute_can_review")
@api.multi
def _compute_can_review(self):
for rec in self:
rec.can_review = self.env.user in rec.reviewer_ids
@api.multi
@api.depends('review_ids')

Loading…
Cancel
Save