Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Nabin Hait 2013-02-01 10:36:17 +05:30
commit c063e653a9
8 changed files with 15 additions and 34 deletions

View File

@ -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
}
]
]

View File

@ -117,6 +117,7 @@ erpnext.update_messages = function(reset) {
wn.call({
method: 'startup.startup.get_global_status_messages',
type:"GET",
callback: set_messages
});

View File

@ -8,7 +8,7 @@ erpnext.send_message = function(opts) {
}
$.ajax({
method: "POST",
type: "POST",
url: "server.py",
data: {
cmd: "website.helpers.contact.send_message",

View File

@ -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):

View File

@ -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

View File

@ -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
},

View File

@ -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)

View File

@ -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>