Updating custom field on Bill upon selection of PO

Updating custom field on Bill upon selection of PO

Hi,

I have a custom field on Purchase order as well as on Bills called "Type of Order". This field is a dropdown type. While creating a bill, I would like to have this field on Bill be auto populated from the corresponding PO's custom field.

For example, the Type of Order is selected as W.O on Purchase order. While creating a bill against this PO, Type of Order on the bill should auto-populate to W.O.

Would appreciate help with the deluge script for the custom function.

Thanks & Regards!