Currently, for the Delivery Note Item custom script, I have only one line:
msgprint("Test - Delivery Note Item");
I just want to make sure that the script is ever executed. But it seems that the script is never executed. When I click Add New Row in the Delivery Note, nothing happens. It seems that the script is never executed. So I suspect that the form that open when we Click Add New Row is not Delivery Note Item form.
Thank you, but still nothing happens. I think the one line code should work if the form is really a Delivery Note Item. I tried the same exact code in the Delivery Note Form. A dialog pops up as soon as I open a Delivery Note.
I think price_list_rate should change because I am changing the item selection say from A to B. So I want to get price_list_rate_B, instead of price_list_rate_A. What I am getting now is price_list_rate_A with item_code_B, even after the refresh and recalculate.
Let us say you have a field in Item Doctype custom_field and you want to fetch this in Delivery Note Item.
In Delivery Note Item make a field with the same name custom_field, this does the trick most of the times, if the field names are same, ERPNext will fetch the value. If this is not working for some reason, go to Customize Form for Delivery Note Item, in Fetch from add item_code.custom_field and Save
This will fetch the value from Item Master to Delivery Note Item