fix: Show "Get Item Location" only if there are reference items

This commit is contained in:
Suraj Shetty 2019-07-30 11:56:24 +05:30
parent 14fb1600ec
commit 72d03464dc

View File

@ -27,13 +27,11 @@ frappe.ui.form.on('Pick Ticket', {
});
}, __("Get items from"));
if (frm.doc.reference_document_items.length) {
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')
}
});