Merge branch 'develop' into payment-terms

This commit is contained in:
tunde
2017-11-14 09:59:45 +01:00
124 changed files with 5882 additions and 4171 deletions

View File

@@ -587,7 +587,11 @@ def validate_bom_no(item, bom_no):
frappe.throw(_("BOM {0} does not belong to Item {1}").format(bom_no, item))
@frappe.whitelist()
def get_children():
def get_children(doctype, parent=None, is_tree=False):
if not parent:
frappe.msgprint(_('Please select a BOM'))
return
if frappe.form_dict.parent:
return frappe.db.sql("""select
bom_item.item_code,

View File

@@ -11,7 +11,7 @@ frappe.treeview_settings["BOM"] = {
title: "BOM",
breadcrumb: "Manufacturing",
disable_add_node: true,
root_label: "bom", //fieldname from filters
root_label: "All Bill of Materials", //fieldname from filters
get_label: function(node) {
if(node.data.qty) {
return node.data.qty + " x " + node.data.item_code;

View File

@@ -17,6 +17,14 @@ frappe.ui.form.on("Production Order", {
}
});
frm.set_query("source_warehouse", function() {
return {
filters: {
'company': frm.doc.company,
}
}
});
frm.set_query("source_warehouse", "required_items", function() {
return {
filters: {

View File

@@ -1358,7 +1358,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2017-07-10 14:29:00.457874",
"modified": "2017-11-03 05:31:56.636424",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Order",
@@ -1412,5 +1412,5 @@
"sort_order": "ASC",
"title_field": "production_item",
"track_changes": 1,
"track_seen": 0
"track_seen": 1
}

View File

@@ -64,7 +64,7 @@ erpnext.ProductionAnalytics = frappe.views.GridReportWithPlot.extend({
var chart_data = this.get_chart_data ? this.get_chart_data() : null;
this.chart = new frappe.chart.FrappeChart({
this.chart = new Chart({
parent: ".chart",
data: chart_data,
type: 'line'