From 62a2cbe361186c7300d9df69ae120f23987f5f8f Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Mon, 2 Dec 2024 04:42:07 -0500 Subject: [PATCH] [FIX] base_tier_validation: last comment instead of first comment - With multiple approbation, the first comment is repeated into mail.message and propagate wrong message --- base_tier_validation/models/tier_validation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base_tier_validation/models/tier_validation.py b/base_tier_validation/models/tier_validation.py index afbd2ff7ed..23532470a7 100644 --- a/base_tier_validation/models/tier_validation.py +++ b/base_tier_validation/models/tier_validation.py @@ -354,7 +354,7 @@ def _notify_accepted_reviews_body(self): lambda r: (self.env.user in r.reviewer_ids) and r.comment ) if has_comment: - comment = has_comment.mapped("comment")[0] + comment = has_comment.mapped("comment")[-1] return _("A review was accepted. (%s)") % comment return _("A review was accepted") @@ -404,7 +404,7 @@ def _notify_rejected_review_body(self): lambda r: (self.env.user in r.reviewer_ids) and r.comment ) if has_comment: - comment = has_comment.mapped("comment")[0] + comment = has_comment.mapped("comment")[-1] return _("A review was rejected by %(user)s. (%(comment)s)") % { "user": self.env.user.name, "comment": comment,