If you wan't to disable it in the current browser window,
You can goto developer mode and in the form view of partner, click on the bug icon, --> edit form view.
In the view definition, find where the button is defined and give an attribute named
invisible="1"
For example, if your button is defined as
<button name="graph_function" type="object" class="oe_stat_button" icon="fa-sitemap">Relation</button>
You can then add invisible as
<button name="graph_function" type="object" class="oe_stat_button" icon="fa-sitemap" invisible="1">Relation</button>
Remember that this is temporary, If you change the browser window, this would still be visible.
Inorder that you want to hide them permanently, you'll have to do backend coding by inheriting the view and adding the attribute "invisible" for the button(s).