From f281a0cf2f7a06b487badaafb41cc5bef85880f0 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 15 Nov 2012 16:35:39 +0530 Subject: [PATCH 1/4] hot:module fix for desktop --- home/page/desktop/desktop.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/home/page/desktop/desktop.js b/home/page/desktop/desktop.js index 4eef2fd26e..289820bd30 100644 --- a/home/page/desktop/desktop.js +++ b/home/page/desktop/desktop.js @@ -60,7 +60,8 @@ erpnext.desktop.render = function() { // setup for(var i in wn.boot.modules_list) { var m = wn.boot.modules_list[i]; - if(!in_list(['Setup'], m) && wn.boot.profile.allow_modules.indexOf(m)!=-1) + if(!in_list(['Setup'], m) && wn.boot.profile.allow_modules.indexOf(m)!=-1 + && erpnext.modules[m]) add_icon(m); } From 85df835db2fab2b3f8366b371fe4390466eb6e57 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 15 Nov 2012 16:36:42 +0530 Subject: [PATCH 2/4] hotfix for desktop icon + updates to assign to and patch --- hr/doctype/appraisal/appraisal.js | 9 --------- hr/doctype/appraisal/appraisal.py | 15 ++++----------- patches/august_2012/task_allocated_to_assigned.py | 3 ++- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/hr/doctype/appraisal/appraisal.js b/hr/doctype/appraisal/appraisal.js index 1243dc48f3..4c7c5e5e95 100644 --- a/hr/doctype/appraisal/appraisal.js +++ b/hr/doctype/appraisal/appraisal.js @@ -71,15 +71,6 @@ cur_frm.cscript.calculate_total_score = function(doc,cdt,cdn){ refresh_field('total_score') } -/*cur_frm.cscript.declare_completed = function(doc,cdt,cdn){ - $c_obj(make_doclist(doc.doctype, doc.name),'declare_completed','', function(r,rt){ - if(r.message){ - refresh_field('Status'); - cur_frm.cscript.refresh(doc,cdt,cdn); - } - }); -}*/ - cur_frm.cscript.declare_completed = function(doc,cdt,cdn){ var declare_completed_dialog; diff --git a/hr/doctype/appraisal/appraisal.py b/hr/doctype/appraisal/appraisal.py index 2b206418f4..39bc3ffa6e 100644 --- a/hr/doctype/appraisal/appraisal.py +++ b/hr/doctype/appraisal/appraisal.py @@ -18,20 +18,13 @@ from __future__ import unicode_literals import webnotes -from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add -from webnotes.model import db_exists -from webnotes.model.doc import Document, addchild, getchildren, make_autoname -from webnotes.model.doclist import getlist, copy_doclist -from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax -from webnotes import session, form, msgprint, errprint +from webnotes.utils import add_days, cstr, flt, getdate, now, nowdate +from webnotes.model.doclist import getlist +from webnotes.model.code import get_obj +from webnotes import msgprint set = webnotes.conn.set sql = webnotes.conn.sql -get_value = webnotes.conn.get_value -in_transaction = webnotes.conn.in_transaction -convert_to_lists = webnotes.conn.convert_to_lists - -# ----------------------------------------------------------------------------------------- class DocType: diff --git a/patches/august_2012/task_allocated_to_assigned.py b/patches/august_2012/task_allocated_to_assigned.py index 1bbc447c76..8485939eec 100644 --- a/patches/august_2012/task_allocated_to_assigned.py +++ b/patches/august_2012/task_allocated_to_assigned.py @@ -11,5 +11,6 @@ def execute(): 'assign_to': t['allocated_to'], 'assigned_by': t['owner'], 'description': t['subject'], - 'date': t['creation'] + 'date': t['creation'], + "no_notification": True }) \ No newline at end of file From 86945fe178446a36db193d98a2c2ead1ffe5ab44 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 15 Nov 2012 16:58:27 +0530 Subject: [PATCH 3/4] fix to customer issue, desktop --- home/page/desktop/desktop.js | 3 +-- .../customer_issue_allocated_to_assigned.py | 9 +++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/home/page/desktop/desktop.js b/home/page/desktop/desktop.js index 289820bd30..75f2922b93 100644 --- a/home/page/desktop/desktop.js +++ b/home/page/desktop/desktop.js @@ -60,8 +60,7 @@ erpnext.desktop.render = function() { // setup for(var i in wn.boot.modules_list) { var m = wn.boot.modules_list[i]; - if(!in_list(['Setup'], m) && wn.boot.profile.allow_modules.indexOf(m)!=-1 - && erpnext.modules[m]) + if(!in_list(['Setup', 'Core'], m) && wn.boot.profile.allow_modules.indexOf(m)!=-1) add_icon(m); } diff --git a/patches/november_2012/customer_issue_allocated_to_assigned.py b/patches/november_2012/customer_issue_allocated_to_assigned.py index 22634018b4..3d870e9a93 100644 --- a/patches/november_2012/customer_issue_allocated_to_assigned.py +++ b/patches/november_2012/customer_issue_allocated_to_assigned.py @@ -3,13 +3,18 @@ import webnotes def execute(): from webnotes.widgets.form.assign_to import add + # clear old customer issue todos + webnotes.conn.sql("""delete from tabToDo where reference_type='Customer Issue'""") + webnotes.conn.sql("""delete from tabComment where comment like '%Form/Customer Issue%'""") for t in webnotes.conn.sql("""select * from `tabCustomer Issue` - where ifnull(allocated_to, '')!=''""", as_dict=1): + where ifnull(allocated_to, '')!='' and ifnull(status, "")="Open" """, as_dict=1): + print t add({ 'doctype': "Customer Issue", 'name': t['name'], 'assign_to': t['allocated_to'], 'assigned_by': t['owner'], 'description': t['complaint'], - 'date': t['creation'] + 'date': t['creation'], + 'no_notification': True }) \ No newline at end of file From 84b638f49ae8023838d6c45500c9c7125ce3508b Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 15 Nov 2012 16:58:36 +0530 Subject: [PATCH 4/4] fix to customer issue, desktop --- patches/november_2012/customer_issue_allocated_to_assigned.py | 1 - 1 file changed, 1 deletion(-) diff --git a/patches/november_2012/customer_issue_allocated_to_assigned.py b/patches/november_2012/customer_issue_allocated_to_assigned.py index 3d870e9a93..fa87262796 100644 --- a/patches/november_2012/customer_issue_allocated_to_assigned.py +++ b/patches/november_2012/customer_issue_allocated_to_assigned.py @@ -8,7 +8,6 @@ def execute(): webnotes.conn.sql("""delete from tabComment where comment like '%Form/Customer Issue%'""") for t in webnotes.conn.sql("""select * from `tabCustomer Issue` where ifnull(allocated_to, '')!='' and ifnull(status, "")="Open" """, as_dict=1): - print t add({ 'doctype': "Customer Issue", 'name': t['name'],