Please apply it.
frappe.ui.form.on('Purchase Order', {
refresh(frm) {
frm.add_custom_button(__("Add Follow-up"), function() {
frappe.route_options = {
"item_code": "TextCode"
};
frappe.set_route("item", "new-item");
});
}
});
Then reload and check it, please.
Thank You!