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()
|
@webnotes.whitelist()
|
||||||
def get_conversion_factor(item_code, uom):
|
def get_conversion_factor(item_code, uom):
|
||||||
return {"conversion_factor": webnotes.conn.get_value("UOM Conversion Detail",
|
return {"conversion_factor": webnotes.conn.get_value("UOM Conversion Detail",
|
||||||
{"parent": item_code, "uom": uom})}
|
{"parent": item_code, "uom": uom}, "conversion_factor")}
|
||||||
|
|
||||||
@webnotes.whitelist()
|
@webnotes.whitelist()
|
||||||
def get_projected_qty(item_code, warehouse):
|
def get_projected_qty(item_code, warehouse):
|
||||||
|
@ -122,16 +122,24 @@ erpnext.SalesChart = Class.extend({
|
|||||||
},
|
},
|
||||||
new_node: function() {
|
new_node: function() {
|
||||||
var me = this;
|
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
|
// the dialog
|
||||||
var d = new wn.ui.Dialog({
|
var d = new wn.ui.Dialog({
|
||||||
title:'New ' + me.ctype,
|
title:'New ' + me.ctype,
|
||||||
fields: [
|
fields: 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' }
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
|
|
||||||
d.set_value("is_group", "No");
|
d.set_value("is_group", "No");
|
||||||
|
@ -30,4 +30,7 @@ def add_node():
|
|||||||
parent_field: webnotes.form_dict['parent'],
|
parent_field: webnotes.form_dict['parent'],
|
||||||
"is_group": webnotes.form_dict['is_group']
|
"is_group": webnotes.form_dict['is_group']
|
||||||
}]
|
}]
|
||||||
|
if ctype == "Sales Person":
|
||||||
|
doclist[0]["employee"] = webnotes.form_dict.get('employee')
|
||||||
|
|
||||||
webnotes.bean(doclist).save()
|
webnotes.bean(doclist).save()
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-02-22 01:28:04",
|
"creation": "2013-02-22 01:28:04",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2013-07-10 14:54:25",
|
"modified": "2013-07-22 17:17:53",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@ -15,6 +15,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
|
"in_list_view": 1,
|
||||||
"name": "__common__",
|
"name": "__common__",
|
||||||
"parent": "UOM Conversion Detail",
|
"parent": "UOM Conversion Detail",
|
||||||
"parentfield": "fields",
|
"parentfield": "fields",
|
||||||
@ -29,7 +30,6 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "uom",
|
"fieldname": "uom",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_list_view": 0,
|
|
||||||
"label": "UOM",
|
"label": "UOM",
|
||||||
"oldfieldname": "uom",
|
"oldfieldname": "uom",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
@ -39,7 +39,6 @@
|
|||||||
"doctype": "DocField",
|
"doctype": "DocField",
|
||||||
"fieldname": "conversion_factor",
|
"fieldname": "conversion_factor",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"in_list_view": 1,
|
|
||||||
"label": "Conversion Factor",
|
"label": "Conversion Factor",
|
||||||
"oldfieldname": "conversion_factor",
|
"oldfieldname": "conversion_factor",
|
||||||
"oldfieldtype": "Float"
|
"oldfieldtype": "Float"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user