mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-18 17:55:40 +00:00
fix: Show "Get Item Location" only if there are reference items
This commit is contained in:
@@ -27,13 +27,11 @@ frappe.ui.form.on('Pick Ticket', {
|
||||
});
|
||||
}, __("Get items from"));
|
||||
|
||||
frm.add_custom_button(__('Get Item Locations'), () => {
|
||||
frm.trigger('set_item_locations');
|
||||
});
|
||||
if (frm.doc.reference_document_items.length) {
|
||||
frm.add_custom_button(__('Get Item Locations'), () => {
|
||||
frm.call('set_item_locations');
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
set_item_locations: (frm) => {
|
||||
frm.call('set_item_locations')
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user