From b390b70ee34f273c349a466afeb23f0e358f041c Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 11 Jul 2019 15:22:03 +0530 Subject: [PATCH] fix: set project in material request when pull items from bom (#18256) --- erpnext/manufacturing/doctype/bom/bom.py | 1 + erpnext/stock/doctype/material_request/material_request.js | 1 + 2 files changed, 2 insertions(+) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 75eb794386..766f6754b6 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -594,6 +594,7 @@ def get_bom_items_as_dict(bom, company, qty=1, fetch_exploded=1, fetch_scrap_ite sum(bom_item.{qty_field}/ifnull(bom.quantity, 1)) * %(qty)s as qty, item.description, item.image, + bom.project, item.stock_uom, item.allow_alternative_item, item_default.default_warehouse, diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js index 5351f32186..96e31ff6ff 100644 --- a/erpnext/stock/doctype/material_request/material_request.js +++ b/erpnext/stock/doctype/material_request/material_request.js @@ -211,6 +211,7 @@ frappe.ui.form.on('Material Request', { d.stock_uom = item.stock_uom; d.conversion_factor = 1; d.qty = item.qty; + d.project = item.project; }); } d.hide();