Skip to content

Commit

Permalink
Merge PR #729 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by LoisRForgeFlow
  • Loading branch information
OCA-git-bot committed Oct 10, 2023
2 parents 9338900 + ecbdd7c commit b10b01c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions base_tier_validation/models/res_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ def review_user_count(self):
.search([("id", "in", reviews.mapped("res_id"))])
.filtered(lambda x: not x.rejected and x.can_review)
)
# Excludes any cancelled records depending on the structure of the model
if self.env[model]._state_field in self.env[model]._fields:
records = records.filtered(
lambda x: x[x._state_field] != x._cancel_state
)
# if len(records):
for rec in records:
record = self.env[model]
Expand Down

0 comments on commit b10b01c

Please sign in to comment.