From 028abd2d08ce9bfcba58aff53346089bfe2600f7 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 31 Jan 2013 11:20:10 +0530 Subject: [PATCH 1/6] bugfix in session update and separated GET and POST queries --- public/js/startup.js | 1 + startup/event_handlers.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/public/js/startup.js b/public/js/startup.js index e2413f124d..1ae3feb613 100644 --- a/public/js/startup.js +++ b/public/js/startup.js @@ -117,6 +117,7 @@ erpnext.update_messages = function(reset) { wn.call({ method: 'startup.startup.get_global_status_messages', + type:"GET", callback: set_messages }); diff --git a/startup/event_handlers.py b/startup/event_handlers.py index 3f04dc797f..2a74eeb58d 100644 --- a/startup/event_handlers.py +++ b/startup/event_handlers.py @@ -25,9 +25,11 @@ def on_login_post_session(login_manager): # create feed from webnotes.utils import nowtime from webnotes.profile import get_user_fullname + webnotes.conn.begin() home.make_feed('Login', 'Profile', login_manager.user, login_manager.user, '%s logged in at %s' % (get_user_fullname(login_manager.user), nowtime()), - login_manager.user=='Administrator' and '#8CA2B3' or '#1B750D') + login_manager.user=='Administrator' and '#8CA2B3' or '#1B750D') + webnotes.conn.commit() def comment_added(doc): From 92455dc7ae2baaae04136e9c999ce5869e06ef8e Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 31 Jan 2013 11:24:22 +0530 Subject: [PATCH 2/6] blog textarea --- website/templates/html/blog_page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/templates/html/blog_page.html b/website/templates/html/blog_page.html index 87dcfef19a..923738275d 100644 --- a/website/templates/html/blog_page.html +++ b/website/templates/html/blog_page.html @@ -46,7 +46,7 @@

-

From ec061b0dcc0af8f1ae67534d6298de92ec4c4715 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 31 Jan 2013 12:36:32 +0530 Subject: [PATCH 3/6] changed item code get query of stock entry --- stock/doctype/stock_entry/stock_entry.js | 28 +++--------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/stock/doctype/stock_entry/stock_entry.js b/stock/doctype/stock_entry/stock_entry.js index 65485b57ec..55a86a3799 100644 --- a/stock/doctype/stock_entry/stock_entry.js +++ b/stock/doctype/stock_entry/stock_entry.js @@ -145,31 +145,9 @@ cur_frm.cscript.purpose = function(doc, cdt, cdn) { var fld = cur_frm.fields_dict['mtn_details'].grid.get_field('item_code'); fld.query_description = "If Source Warehouse is selected, items with existing stock \ for that warehouse will be selected"; - -fld.get_query = function(doc, cdt, cdn) { - var d = locals[cdt][cdn]; - if(d.s_warehouse) { - return 'SELECT tabItem.name, tabItem.description, tabBin.actual_qty ' - + 'FROM tabItem, tabBin ' - + 'WHERE tabItem.name = tabBin.item_code ' - + 'AND tabItem.is_stock_item = "Yes"' - + 'AND ifnull(`tabBin`.`actual_qty`,0) > 0 ' - + 'AND tabBin.warehouse="'+ d.s_warehouse +'" ' - + 'AND tabItem.docstatus < 2 ' - + 'AND (ifnull(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` > NOW() OR `tabItem`.`end_of_life`="0000-00-00") ' - + 'AND tabItem.%(key)s LIKE "%s" ' - + 'ORDER BY tabItem.name ASC ' - + 'LIMIT 50' - } else { - return 'SELECT tabItem.name, tabItem.description ' - + 'FROM tabItem ' - + 'WHERE tabItem.docstatus < 2 ' - + 'AND tabItem.is_stock_item = "Yes"' - + 'AND (ifnull(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` > NOW() OR `tabItem`.`end_of_life`="0000-00-00") ' - + 'AND tabItem.%(key)s LIKE "%s" ' - + 'ORDER BY tabItem.name ASC ' - + 'LIMIT 50' - } + +fld.get_query = function() { + return erpnext.queries.item({is_stock_item: "Yes"}); } // copy over source and target warehouses From fdc629be4dd91c8b244bf60f497011a71caa44ab Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 31 Jan 2013 22:05:39 +0530 Subject: [PATCH 4/6] get post fix --- public/js/website_utils.js | 2 +- website/helpers/contact.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/website_utils.js b/public/js/website_utils.js index 6f90434b7b..de4be6939f 100644 --- a/public/js/website_utils.js +++ b/public/js/website_utils.js @@ -8,7 +8,7 @@ erpnext.send_message = function(opts) { } $.ajax({ - method: "POST", + type: "POST", url: "server.py", data: { cmd: "website.helpers.contact.send_message", diff --git a/website/helpers/contact.py b/website/helpers/contact.py index 0ec279ecad..22f2555bf4 100644 --- a/website/helpers/contact.py +++ b/website/helpers/contact.py @@ -32,7 +32,7 @@ def send_message(subject="Website Query", message="", sender="", status="Open"): return # make lead / communication - + name = webnotes.conn.get_value("Lead", {"email_id": sender}, "name") if name: lead = webnotes.model_wrapper("Lead", name) From cd3207ada514959d36848b198d2e17b57ab1800d Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 31 Jan 2013 22:18:07 +0530 Subject: [PATCH 5/6] support ticket customer not read only --- support/doctype/support_ticket/support_ticket.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/support/doctype/support_ticket/support_ticket.txt b/support/doctype/support_ticket/support_ticket.txt index 2433f0c8ac..f058a9e156 100644 --- a/support/doctype/support_ticket/support_ticket.txt +++ b/support/doctype/support_ticket/support_ticket.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-10 16:34:31", "docstatus": 0, - "modified": "2013-01-28 15:29:06", + "modified": "2013-01-31 22:17:24", "modified_by": "Administrator", "owner": "Administrator" }, @@ -159,7 +159,7 @@ "oldfieldtype": "Link", "options": "Customer", "print_hide": 1, - "read_only": 1, + "read_only": 0, "reqd": 0, "search_index": 1 }, From 9a1b91cf6edee8abd93b7c86e9266aa0dc12610b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 1 Feb 2013 10:35:14 +0530 Subject: [PATCH 6/6] Update hr/doctype/leave_application/leave_application.txt fixed option of field amended_from --- hr/doctype/leave_application/leave_application.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hr/doctype/leave_application/leave_application.txt b/hr/doctype/leave_application/leave_application.txt index 310d2056a1..4436d3c2f8 100644 --- a/hr/doctype/leave_application/leave_application.txt +++ b/hr/doctype/leave_application/leave_application.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-10 16:34:14", "docstatus": 0, - "modified": "2013-01-29 17:41:32", + "modified": "2013-02-01 10:34:14", "modified_by": "Administrator", "owner": "Administrator" }, @@ -196,7 +196,7 @@ "fieldtype": "Link", "label": "Amended From", "no_copy": 1, - "options": "Sales Invoice", + "options": "Leave Application", "permlevel": 0, "print_hide": 1, "read_only": 1 @@ -241,4 +241,4 @@ "role": "Leave Approver", "submit": 0 } -] \ No newline at end of file +]