[enhance] Get project from bom on production order
This commit is contained in:
parent
c040015bb5
commit
e7c0188732
@ -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]);
|
||||
});
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user