How to hide fetch Timesheet button

Hi @Rahul7218,

Please apply the client script for that.

frappe.ui.form.on('Sales Invoice', {
    refresh(frm) {
        setTimeout(() => {
            frm.remove_custom_button('Fetch Timesheet');
        }, 10);
    }
});

Reference: Hide Buttons in Form View

Thank You!

Thank You @NCP