Where to add custom script for sales invoice?

Hi , I want override sales_invoice.js to add more buttons inside Get Info from() ,
so where to write the new script in my custom app and how to link it

  • I already have the script to generate the buttons
  • I don’t want to edit sales_invoice.js I feel its bad choice .

best regards ,
thanks

You can write custom javascript from:

Setup > Customize > Custom Script

https://erpnext.org/docs/user/manual/en/customize-erpnext/custom-scripts

1 Like

this really nice ,
I found the solution by write this in. hooks.py and create file “public/js/sales_invoice_doctype.js” inside my custom_app

doctype_js = {“Sales Invoice” : “public/js/sales_invoice_doctype.js”}

thanks @umair for helping