From 2cd4531a8de8b6b22f02e23d752b3730f241a8e0 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 21 Mar 2012 18:03:00 +0530 Subject: [PATCH 1/2] simple fix in assign to --- py/webnotes/boot.py | 2 +- py/webnotes/widgets/form/assign_to.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/py/webnotes/boot.py b/py/webnotes/boot.py index ea6b6049dc..428a4b8c7e 100644 --- a/py/webnotes/boot.py +++ b/py/webnotes/boot.py @@ -41,7 +41,7 @@ def get_bootinfo(): # remove email settings from control panel dict for field in ['mail_login', 'mail_password', 'mail_port', 'outgoing_mail_server', 'use_ssl']: - del cp[field] + if field in cp: del cp[field] # system info bootinfo['control_panel'] = cp.copy() diff --git a/py/webnotes/widgets/form/assign_to.py b/py/webnotes/widgets/form/assign_to.py index bc305eda22..c9ae0e7e73 100644 --- a/py/webnotes/widgets/form/assign_to.py +++ b/py/webnotes/widgets/form/assign_to.py @@ -110,7 +110,7 @@ def notify_assignment(assigned_by, owner, doc_type, doc_name, action='CLOSE', no arg = { 'uid': owner, 'comment': "A new task, %s, has been assigned to you by %s." \ - % (assignment, webnotes.session.get('uer')), + % (assignment, webnotes.session.get('user')), 'notify': notify } from home.page.my_company import my_company From 603cc7703556c210f6813ba3d1ce6e231e419ff9 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 22 Mar 2012 11:02:28 +0530 Subject: [PATCH 2/2] assign to - allow comments --- js/legacy/wn/widgets/form/assign_to.js | 3 +-- py/webnotes/boot.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/js/legacy/wn/widgets/form/assign_to.js b/js/legacy/wn/widgets/form/assign_to.js index 5d2b5f03f1..f3fa5a4e9c 100644 --- a/js/legacy/wn/widgets/form/assign_to.js +++ b/js/legacy/wn/widgets/form/assign_to.js @@ -79,8 +79,7 @@ wn.widgets.form.sidebar.AssignTo = Class.extend({ {fieldtype:'Link', fieldname:'assign_to', options:'Profile', label:'Assign To', description:'Add to To Do List of', reqd:true}, - {fieldtype:'Data', fieldname:'description', label:'Comment', - 'default': 'Assigned by ' + user}, + {fieldtype:'Data', fieldname:'description', label:'Comment'}, {fieldtype:'Date', fieldname:'date', label:'Complete By'}, {fieldtype:'Select', fieldname:'priority', label:'Priority', options:'Low\nMedium\nHigh', 'default':'Medium'}, diff --git a/py/webnotes/boot.py b/py/webnotes/boot.py index 428a4b8c7e..6c6a32cfa5 100644 --- a/py/webnotes/boot.py +++ b/py/webnotes/boot.py @@ -77,7 +77,7 @@ def get_fullnames(): import webnotes ret = webnotes.conn.sql("""select name, concat(ifnull(first_name, ''), - if(ifnull(first_name, '')!='', ' ', ''), ifnull(last_name, '')), + if(ifnull(last_name, '')!='', ' ', ''), ifnull(last_name, '')), user_image, gender from tabProfile where ifnull(enabled, 0)=1""", as_list=1) d = {}