Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbauskar committed Jul 7, 2017
2 parents 74d07c6 + 7b5ca3e commit ab59e47
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion erpnext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'''
Expand Down
7 changes: 4 additions & 3 deletions erpnext/accounts/doctype/sales_invoice/sales_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,9 +803,10 @@ def update_serial_no(self, in_cancel=False):
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):
"""
Expand Down
36 changes: 19 additions & 17 deletions erpnext/manufacturing/doctype/production_order/production_order.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit ab59e47

Please sign in to comment.