Using this code base you can add a new button on odoo form view which will fire the JavaScript's click event.
ZahdiM/Javascript-click-event-on-odoo-form-view
Using this code base you can add a new on odoo form view which will fire the JavaScript's click function. Version 13 only.
PythonGPL-3.0