fix: material request connection on work order
This commit is contained in:
parent
756fe4b375
commit
9ab10def49
@ -7,6 +7,6 @@ def get_data():
|
|||||||
"non_standard_fieldnames": {"Batch": "reference_name"},
|
"non_standard_fieldnames": {"Batch": "reference_name"},
|
||||||
"transactions": [
|
"transactions": [
|
||||||
{"label": _("Transactions"), "items": ["Stock Entry", "Job Card", "Pick List"]},
|
{"label": _("Transactions"), "items": ["Stock Entry", "Job Card", "Pick List"]},
|
||||||
{"label": _("Reference"), "items": ["Serial No", "Batch"]},
|
{"label": _("Reference"), "items": ["Serial No", "Batch", "Material Request"]},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,8 @@
|
|||||||
"tc_name",
|
"tc_name",
|
||||||
"terms",
|
"terms",
|
||||||
"reference",
|
"reference",
|
||||||
"job_card"
|
"job_card",
|
||||||
|
"work_order"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@ -309,16 +310,24 @@
|
|||||||
"label": "Transfer Status",
|
"label": "Transfer Status",
|
||||||
"options": "\nNot Started\nIn Transit\nCompleted",
|
"options": "\nNot Started\nIn Transit\nCompleted",
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "work_order",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Work Order",
|
||||||
|
"options": "Work Order",
|
||||||
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "fa fa-ticket",
|
"icon": "fa fa-ticket",
|
||||||
"idx": 70,
|
"idx": 70,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-08-17 20:16:12.737743",
|
"modified": "2022-08-25 11:49:28.155048",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Material Request",
|
"name": "Material Request",
|
||||||
|
"naming_rule": "By \"Naming Series\" field",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
@ -386,5 +395,6 @@
|
|||||||
"show_name_in_global_search": 1,
|
"show_name_in_global_search": 1,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
|
"states": [],
|
||||||
"title_field": "title"
|
"title_field": "title"
|
||||||
}
|
}
|
@ -174,6 +174,8 @@ frappe.ui.form.on('Stock Entry', {
|
|||||||
if(!items.length) {
|
if(!items.length) {
|
||||||
items = frm.doc.items;
|
items = frm.doc.items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mr.work_order = frm.doc.work_order;
|
||||||
items.forEach(function(item) {
|
items.forEach(function(item) {
|
||||||
var mr_item = frappe.model.add_child(mr, 'items');
|
var mr_item = frappe.model.add_child(mr, 'items');
|
||||||
mr_item.item_code = item.item_code;
|
mr_item.item_code = item.item_code;
|
||||||
|
Loading…
Reference in New Issue
Block a user