mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
fix(ux): move get_route_options_for_new_doc to refresh (#37096)
fix: move `get_route_options_for_new_doc` to `refresh`
This commit is contained in:
@@ -23,17 +23,6 @@ frappe.ui.form.on('Job Card', {
|
||||
}
|
||||
});
|
||||
|
||||
let sbb_field = frm.get_docfield('serial_and_batch_bundle');
|
||||
if (sbb_field) {
|
||||
sbb_field.get_route_options_for_new_doc = () => {
|
||||
return {
|
||||
'item_code': frm.doc.production_item,
|
||||
'warehouse': frm.doc.wip_warehouse,
|
||||
'voucher_type': frm.doc.doctype,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
frm.set_indicator_formatter('sub_operation',
|
||||
function(doc) {
|
||||
if (doc.status == "Pending") {
|
||||
@@ -124,6 +113,17 @@ frappe.ui.form.on('Job Card', {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let sbb_field = frm.get_docfield('serial_and_batch_bundle');
|
||||
if (sbb_field) {
|
||||
sbb_field.get_route_options_for_new_doc = () => {
|
||||
return {
|
||||
'item_code': frm.doc.production_item,
|
||||
'warehouse': frm.doc.wip_warehouse,
|
||||
'voucher_type': frm.doc.doctype,
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
setup_quality_inspection: function(frm) {
|
||||
|
||||
Reference in New Issue
Block a user