Merge branch 'develop'

This commit is contained in:
mbauskar 2017-07-07 17:12:37 +05:30
commit ab59e4769b
4 changed files with 26 additions and 27 deletions

View File

@ -2,7 +2,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import frappe import frappe
__version__ = '8.3.3' __version__ = '8.3.4'
def get_default_company(user=None): def get_default_company(user=None):
'''Get default company for user''' '''Get default company for user'''

View File

@ -803,9 +803,10 @@ class SalesInvoice(SellingController):
continue continue
for serial_no in item.serial_no.split("\n"): for serial_no in item.serial_no.split("\n"):
sno = frappe.get_doc('Serial No', serial_no) if serial_no and frappe.db.exists('Serial No', serial_no):
sno.sales_invoice = invoice sno = frappe.get_doc('Serial No', serial_no)
sno.db_update() sno.sales_invoice = invoice
sno.db_update()
def validate_serial_numbers(self): def validate_serial_numbers(self):
""" """

View File

@ -151,26 +151,28 @@ frappe.ui.form.on("Production Order", {
}, },
production_item: function(frm) { production_item: function(frm) {
frappe.call({ if (frm.doc.production_item) {
method: "erpnext.manufacturing.doctype.production_order.production_order.get_item_details", frappe.call({
args: { method: "erpnext.manufacturing.doctype.production_order.production_order.get_item_details",
item: frm.doc.production_item, args: {
project: frm.doc.project item: frm.doc.production_item,
}, project: frm.doc.project
callback: function(r) { },
if(r.message) { callback: function(r) {
erpnext.in_production_item_onchange = true; if(r.message) {
$.each(["description", "stock_uom", "project", "bom_no"], function(i, field) { erpnext.in_production_item_onchange = true;
frm.set_value(field, r.message[field]); $.each(["description", "stock_uom", "project", "bom_no"], function(i, field) {
}); frm.set_value(field, r.message[field]);
});
if(r.message["set_scrap_wh_mandatory"]){ if(r.message["set_scrap_wh_mandatory"]){
frm.toggle_reqd("scrap_warehouse", true); frm.toggle_reqd("scrap_warehouse", true);
}
erpnext.in_production_item_onchange = false;
} }
erpnext.in_production_item_onchange = false;
} }
} });
}); }
}, },
project: function(frm) { project: function(frm) {

View File

@ -30,12 +30,8 @@ erpnext.selling.InstallationNote = frappe.ui.form.Controller.extend({
setup_queries: function() { setup_queries: function() {
var me = this; var me = this;
this.frm.set_query("customer_address", function() { frappe.dynamic_link = {doc: this.frm.doc, fieldname: 'customer', doctype: 'Customer'}
return { frm.set_query('customer_address', erpnext.queries.address_query);
filters: {'customer': me.frm.doc.customer }
}
});
this.frm.set_query('contact_person', erpnext.queries.contact_query); this.frm.set_query('contact_person', erpnext.queries.contact_query);
this.frm.set_query("customer", function() { this.frm.set_query("customer", function() {