How to enable pop up for serial number selection

How to automatically pop up this serial number selection window in sales invoice, delivery notes , material transfers and purchase invoices etc…