mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 13:24:47 +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:
@@ -40,16 +40,6 @@ frappe.ui.form.on('Asset Repair', {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
let sbb_field = frm.get_docfield('stock_items', 'serial_and_batch_bundle');
|
||||
if (sbb_field) {
|
||||
sbb_field.get_route_options_for_new_doc = (row) => {
|
||||
return {
|
||||
'item_code': row.doc.item_code,
|
||||
'voucher_type': frm.doc.doctype,
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
refresh: function(frm) {
|
||||
@@ -61,6 +51,16 @@ frappe.ui.form.on('Asset Repair', {
|
||||
frappe.set_route("query-report", "General Ledger");
|
||||
});
|
||||
}
|
||||
|
||||
let sbb_field = frm.get_docfield('stock_items', 'serial_and_batch_bundle');
|
||||
if (sbb_field) {
|
||||
sbb_field.get_route_options_for_new_doc = (row) => {
|
||||
return {
|
||||
'item_code': row.doc.item_code,
|
||||
'voucher_type': frm.doc.doctype,
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
repair_status: (frm) => {
|
||||
|
||||
Reference in New Issue
Block a user