From 7ac6bd825ea954b98962be8bd1d001b6f07a7cf1 Mon Sep 17 00:00:00 2001 From: jayraj-omnia Date: Thu, 9 Jan 2025 11:45:34 +0530 Subject: [PATCH] [MOD] add user details in activity done or eco validation message --- activity_validation/models/mail_activity.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/activity_validation/models/mail_activity.py b/activity_validation/models/mail_activity.py index c06921e2..28ea4903 100755 --- a/activity_validation/models/mail_activity.py +++ b/activity_validation/models/mail_activity.py @@ -249,12 +249,13 @@ def checkChildrenECODone(self, activity_id): raise UserError(_('You cannot move to Done because there are pending ECO activities.')) def checkChildrenECRDone(self, activity_id): - do_ecr = True + do_ecr = f"You cannot move to ECO or to Done because there are pending ECR activities for User:\n" for child in activity_id.children_ids: if child.plm_state not in ['done', 'cancel']: - do_ecr = False - if not do_ecr: - raise UserError(_('You cannot move to ECO or to Done because there are pending ECR activities.')) + do_ecr += f"\t-->\t{child.user_id.name}\n" + + if do_ecr: + raise UserError(_(do_ecr)) def action_to_eco(self): for activity_id in self: