fix: added job_card_item link in material request (#28222)
* fix: added job_card_item links in material request
* fix: add no copy to row references
diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py
index e1d79be..b3b9407 100644
--- a/erpnext/manufacturing/doctype/job_card/job_card.py
+++ b/erpnext/manufacturing/doctype/job_card/job_card.py
@@ -605,7 +605,8 @@
"doctype": "Material Request Item",
"field_map": {
"required_qty": "qty",
- "uom": "stock_uom"
+ "uom": "stock_uom",
+ "name": "job_card_item"
},
"postprocess": update_item,
}
diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py
index 17df977..ec01cae 100644
--- a/erpnext/stock/doctype/material_request/material_request.py
+++ b/erpnext/stock/doctype/material_request/material_request.py
@@ -502,7 +502,8 @@
"field_map": {
"name": "material_request_item",
"parent": "material_request",
- "uom": "stock_uom"
+ "uom": "stock_uom",
+ "job_card_item": "job_card_item"
},
"postprocess": update_item,
"condition": lambda doc: doc.ordered_qty < doc.stock_qty
diff --git a/erpnext/stock/doctype/material_request_item/material_request_item.json b/erpnext/stock/doctype/material_request_item/material_request_item.json
index 25bbbbd..2bad42a 100644
--- a/erpnext/stock/doctype/material_request_item/material_request_item.json
+++ b/erpnext/stock/doctype/material_request_item/material_request_item.json
@@ -52,6 +52,7 @@
"sales_order_item",
"production_plan",
"material_request_plan_item",
+ "job_card_item",
"col_break4",
"expense_account",
"section_break_46",
@@ -444,16 +445,25 @@
{
"fieldname": "qty_info_col_break",
"fieldtype": "Column Break"
+ },
+ {
+ "fieldname": "job_card_item",
+ "fieldtype": "Data",
+ "hidden": 1,
+ "no_copy": 1,
+ "print_hide": 1,
+ "label": "Job Card Item"
}
],
"idx": 1,
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
- "modified": "2020-10-02 11:44:36.553064",
+ "modified": "2021-11-03 14:40:24.409826",
"modified_by": "Administrator",
"module": "Stock",
"name": "Material Request Item",
+ "naming_rule": "Random",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",