Skip to content

Commit

Permalink
fix: added job_card_item link in material request (#28222) (#28434)
Browse files Browse the repository at this point in the history
* fix: added job_card_item links in material request

* fix: add no copy to row references

(cherry picked from commit cb064b0)

Co-authored-by: Noah Jacob <noahjacobkurian@gmail.com>
  • Loading branch information
mergify[bot] and noahjacob committed Nov 17, 2021
1 parent 16b9068 commit b4db336
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
3 changes: 2 additions & 1 deletion erpnext/manufacturing/doctype/job_card/job_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,8 @@ def set_missing_values(source, target):
"doctype": "Material Request Item",
"field_map": {
"required_qty": "qty",
"uom": "stock_uom"
"uom": "stock_uom",
"name": "job_card_item"
},
"postprocess": update_item,
}
Expand Down
3 changes: 2 additions & 1 deletion erpnext/stock/doctype/material_request/material_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,8 @@ def set_missing_values(source, target):
"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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"sales_order_item",
"production_plan",
"material_request_plan_item",
"job_card_item",
"col_break4",
"expense_account",
"section_break_46",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit b4db336

Please sign in to comment.