Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
2fdd874cae
@ -207,7 +207,7 @@ def get_last_purchase_details(item_code, doc_name, conversion_rate=1.0):
|
||||
@webnotes.whitelist()
|
||||
def get_conversion_factor(item_code, uom):
|
||||
return {"conversion_factor": webnotes.conn.get_value("UOM Conversion Detail",
|
||||
{"parent": item_code, "uom": uom})}
|
||||
{"parent": item_code, "uom": uom}, "conversion_factor")}
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_projected_qty(item_code, warehouse):
|
||||
|
@ -122,16 +122,24 @@ erpnext.SalesChart = Class.extend({
|
||||
},
|
||||
new_node: function() {
|
||||
var me = this;
|
||||
|
||||
|
||||
var fields = [
|
||||
{fieldtype:'Data', fieldname: 'name_field',
|
||||
label:'New ' + me.ctype + ' Name', reqd:true},
|
||||
{fieldtype:'Select', fieldname:'is_group', label:'Group Node', options:'No\nYes',
|
||||
description: "Further nodes can be only created under 'Group' type nodes"},
|
||||
{fieldtype:'Button', fieldname:'create_new', label:'Create New' }
|
||||
]
|
||||
|
||||
if(me.ctype == "Sales Person") {
|
||||
fields.splice(-1, 0, {fieldtype:'Link', fieldname:'employee', label:'Employee',
|
||||
options:'Employee', description: "Please enter Employee Id of this sales parson"});
|
||||
}
|
||||
|
||||
// the dialog
|
||||
var d = new wn.ui.Dialog({
|
||||
title:'New ' + me.ctype,
|
||||
fields: [
|
||||
{fieldtype:'Data', fieldname: 'name_field', label:'New ' + me.ctype + ' Name', reqd:true},
|
||||
{fieldtype:'Select', fieldname:'is_group', label:'Group Node',
|
||||
options:'No\nYes', description: "Further nodes can be only created under 'Group' type nodes"},
|
||||
{fieldtype:'Button', fieldname:'create_new', label:'Create New' }
|
||||
]
|
||||
fields: fields
|
||||
})
|
||||
|
||||
d.set_value("is_group", "No");
|
||||
|
@ -30,4 +30,7 @@ def add_node():
|
||||
parent_field: webnotes.form_dict['parent'],
|
||||
"is_group": webnotes.form_dict['is_group']
|
||||
}]
|
||||
if ctype == "Sales Person":
|
||||
doclist[0]["employee"] = webnotes.form_dict.get('employee')
|
||||
|
||||
webnotes.bean(doclist).save()
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-02-22 01:28:04",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-10 14:54:25",
|
||||
"modified": "2013-07-22 17:17:53",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -15,6 +15,7 @@
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"in_list_view": 1,
|
||||
"name": "__common__",
|
||||
"parent": "UOM Conversion Detail",
|
||||
"parentfield": "fields",
|
||||
@ -29,7 +30,6 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "uom",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 0,
|
||||
"label": "UOM",
|
||||
"oldfieldname": "uom",
|
||||
"oldfieldtype": "Link",
|
||||
@ -39,7 +39,6 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "conversion_factor",
|
||||
"fieldtype": "Float",
|
||||
"in_list_view": 1,
|
||||
"label": "Conversion Factor",
|
||||
"oldfieldname": "conversion_factor",
|
||||
"oldfieldtype": "Float"
|
||||
|
Loading…
Reference in New Issue
Block a user