Restricting Sale Order List view using a custom field to a certain role

Can you assist me in another issue? I would like to change the delivery note in all drug orders to a prescription and leave delivery note for other sales orders have an idea on how to achieve that?

explain in details more…

We need to create a prescription that a pharmacist prints on disbursement of the drugs. Drugs are disbursed when a user pays. So the way we do it is we do a sales order - make an sales invoice - the customer pays for that invoice which changes the sales order to deliver …We want to print a prescription at this point. I have already created a custom doctype called prescription with the data we need. Integrating this to sales orders that are of type drug order only is where we have a challenge

for this you need to write custom script and python script . you should check sales_order.py and sales_order.js file…

You have any leads or examples. The documentation on custom scripts is not thorough. I understand python so I will be at home