How to apply filter in item_code

I want to apply some filters in item_code of item doctype , so according to that filter item_code will be shown in sales order , sales invoice, delivery note.

also I , want to know every time when item_code got click in sales_invoice , sales order item_query function is called from queries.py in controller folder , from which file item_query function is called

Check this: