fix: Show "Get Item Location" only if there are reference items
This commit is contained in:
parent
14fb1600ec
commit
72d03464dc
@ -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')
|
||||
}
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user