[enhance] Get project from bom on production order

This commit is contained in:
Rohit Waghchaure 2017-03-31 13:40:06 +05:30
parent c040015bb5
commit e7c0188732
2 changed files with 2 additions and 1 deletions

View File

@ -218,7 +218,7 @@ $.extend(cur_frm.cscript, {
project: doc.project
},
callback: function(r) {
$.each(["description", "stock_uom", "bom_no"], function(i, field) {
$.each(["description", "stock_uom", "project", "bom_no"], function(i, field) {
cur_frm.set_value(field, r.message[field]);
});

View File

@ -498,6 +498,7 @@ def get_item_details(item, project = None):
frappe.throw(_("Default BOM for {0} not found for Project {1}").format(item, project))
frappe.throw(_("Default BOM for {0} not found").format(item))
res['project'] = frappe.db.get_value('BOM', res['bom_no'], 'project')
res.update(check_if_scrap_warehouse_mandatory(res["bom_no"]))
return res