From 2b92887f7a063e51d17263c2550c70b265697759 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 14 Mar 2012 12:25:16 +0530 Subject: [PATCH] change in assign to msg --- py/webnotes/widgets/form/assign_to.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/py/webnotes/widgets/form/assign_to.py b/py/webnotes/widgets/form/assign_to.py index 28b13ea380..bc305eda22 100644 --- a/py/webnotes/widgets/form/assign_to.py +++ b/py/webnotes/widgets/form/assign_to.py @@ -93,14 +93,24 @@ def notify_assignment(assigned_by, owner, doc_type, doc_name, action='CLOSE', no # Search for email address in description -- i.e. assignee assignment = """%s""" % (doc_type, doc_name, doc_name) if action=='CLOSE': - arg = { - 'uid': assigned_by, - 'comment': "The task %s, assigned to %s, has been closed by %s" % (assignment, owner, webnotes.user.name) - } + if owner == webnotes.session.get('user'): + arg = { + 'uid': assigned_by, + 'comment': "The task %s, that you assigned to %s, has been \ + closed." % (assignment, owner) + } + else: + arg = { + 'uid': assigned_by, + 'comment': "The task %s, that you assigned to %s, \ + has been closed by %s." % (assignment, owner, + webnotes.session.get('user')) + } else: arg = { 'uid': owner, - 'comment': "A new task, %s, has been assigned to you by %s" % (assignment, webnotes.user.name), + 'comment': "A new task, %s, has been assigned to you by %s." \ + % (assignment, webnotes.session.get('uer')), 'notify': notify } from home.page.my_company import my_company