mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 12:49:10 +00:00
fix(ux): move get_route_options_for_new_doc to refresh (#37092)
fix: move `get_route_options_for_new_doc` to `refresh`
This commit is contained in:
@@ -75,15 +75,6 @@ frappe.ui.form.on('Subcontracting Receipt', {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
let batch_no_field = frm.get_docfield('items', 'batch_no');
|
||||
if (batch_no_field) {
|
||||
batch_no_field.get_route_options_for_new_doc = function(row) {
|
||||
return {
|
||||
'item': row.doc.item_code
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
refresh: (frm) => {
|
||||
@@ -148,6 +139,15 @@ frappe.ui.form.on('Subcontracting Receipt', {
|
||||
|
||||
frm.fields_dict.supplied_items.grid.update_docfield_property('consumed_qty', 'read_only', frm.doc.__onload && frm.doc.__onload.backflush_based_on === 'BOM');
|
||||
}
|
||||
|
||||
let batch_no_field = frm.get_docfield('items', 'batch_no');
|
||||
if (batch_no_field) {
|
||||
batch_no_field.get_route_options_for_new_doc = function(row) {
|
||||
return {
|
||||
'item': row.doc.item_code
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
set_warehouse: (frm) => {
|
||||
@@ -202,4 +202,4 @@ let set_missing_values = (frm) => {
|
||||
if (!r.exc) frm.refresh();
|
||||
},
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user