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
import frappe
__version__ = '8.3.3'
__version__ = '8.3.4'
def get_default_company(user=None):
'''Get default company for user'''

View File

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

View File

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

View File

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