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"));
|
}, __("Get items from"));
|
||||||
|
|
||||||
|
if (frm.doc.reference_document_items.length) {
|
||||||
frm.add_custom_button(__('Get Item Locations'), () => {
|
frm.add_custom_button(__('Get Item Locations'), () => {
|
||||||
frm.trigger('set_item_locations');
|
frm.call('set_item_locations');
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
set_item_locations: (frm) => {
|
|
||||||
frm.call('set_item_locations')
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user