fix: material request connection on work order

This commit is contained in:
Rohit Waghchaure 2022-08-25 12:13:17 +05:30
parent 756fe4b375
commit 9ab10def49
3 changed files with 15 additions and 3 deletions

View File

@ -7,6 +7,6 @@ def get_data():
"non_standard_fieldnames": {"Batch": "reference_name"},
"transactions": [
{"label": _("Transactions"), "items": ["Stock Entry", "Job Card", "Pick List"]},
{"label": _("Reference"), "items": ["Serial No", "Batch"]},
{"label": _("Reference"), "items": ["Serial No", "Batch", "Material Request"]},
],
}

View File

@ -37,7 +37,8 @@
"tc_name",
"terms",
"reference",
"job_card"
"job_card",
"work_order"
],
"fields": [
{
@ -309,16 +310,24 @@
"label": "Transfer Status",
"options": "\nNot Started\nIn Transit\nCompleted",
"read_only": 1
},
{
"fieldname": "work_order",
"fieldtype": "Link",
"label": "Work Order",
"options": "Work Order",
"read_only": 1
}
],
"icon": "fa fa-ticket",
"idx": 70,
"is_submittable": 1,
"links": [],
"modified": "2021-08-17 20:16:12.737743",
"modified": "2022-08-25 11:49:28.155048",
"modified_by": "Administrator",
"module": "Stock",
"name": "Material Request",
"naming_rule": "By \"Naming Series\" field",
"owner": "Administrator",
"permissions": [
{
@ -386,5 +395,6 @@
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"title_field": "title"
}

View File

@ -174,6 +174,8 @@ frappe.ui.form.on('Stock Entry', {
if(!items.length) {
items = frm.doc.items;
}
mr.work_order = frm.doc.work_order;
items.forEach(function(item) {
var mr_item = frappe.model.add_child(mr, 'items');
mr_item.item_code = item.item_code;