Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/hr/doctype/leave_application/leave_application.txt b/hr/doctype/leave_application/leave_application.txt
index 310d205..4436d3c 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
+]
diff --git a/public/js/startup.js b/public/js/startup.js
index e2413f1..1ae3feb 100644
--- a/public/js/startup.js
+++ b/public/js/startup.js
@@ -117,6 +117,7 @@
wn.call({
method: 'startup.startup.get_global_status_messages',
+ type:"GET",
callback: set_messages
});
diff --git a/public/js/website_utils.js b/public/js/website_utils.js
index 6f90434..de4be69 100644
--- a/public/js/website_utils.js
+++ b/public/js/website_utils.js
@@ -8,7 +8,7 @@
}
$.ajax({
- method: "POST",
+ type: "POST",
url: "server.py",
data: {
cmd: "website.helpers.contact.send_message",
diff --git a/startup/event_handlers.py b/startup/event_handlers.py
index 3f04dc7..2a74eeb 100644
--- a/startup/event_handlers.py
+++ b/startup/event_handlers.py
@@ -25,9 +25,11 @@
# 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):
diff --git a/stock/doctype/stock_entry/stock_entry.js b/stock/doctype/stock_entry/stock_entry.js
index 65485b5..55a86a3 100644
--- a/stock/doctype/stock_entry/stock_entry.js
+++ b/stock/doctype/stock_entry/stock_entry.js
@@ -145,31 +145,9 @@
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
diff --git a/support/doctype/support_ticket/support_ticket.txt b/support/doctype/support_ticket/support_ticket.txt
index 2433f0c..f058a9e 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
},
diff --git a/website/helpers/contact.py b/website/helpers/contact.py
index 0ec279e..22f2555 100644
--- a/website/helpers/contact.py
+++ b/website/helpers/contact.py
@@ -32,7 +32,7 @@
return
# make lead / communication
-
+
name = webnotes.conn.get_value("Lead", {"email_id": sender}, "name")
if name:
lead = webnotes.model_wrapper("Lead", name)
diff --git a/website/templates/html/blog_page.html b/website/templates/html/blog_page.html
index 87dcfef..9237382 100644
--- a/website/templates/html/blog_page.html
+++ b/website/templates/html/blog_page.html
@@ -46,7 +46,7 @@
<input name="comment_by" placeholder="Your Email Id" />
</p>
<p>
- <textarea name="comment" placeholder="Comment" />
+ <textarea name="comment" placeholder="Comment" style="width: 300px; height: 120px;"/>
</textarea>
</p>
<p>