I have created a custom field net_weight in the Quotation Item doctype and need to read the item net_weiht from tabItem in this field when the user adds new line in the quotation and chooses the item.
How can I do this ?
Thanks.
HF
–
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
On Thu, May 16, 2013 at 3:03 PM, HF <gm...@gmail.com> wrote:
Hi;
I have created a custom field net_weight in the Quotation Item doctype and need to read the item net_weiht from tabItem in this field when the user adds new line in the quotation and chooses the item.
How can I do this ?
Thanks.
HF
–
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
In your first email, you mentioned that field added in the Quotation Item is Net Weight. Also, Net Weight is to be pulled from item master. Do you want to pull Gross Weight as well?
The script to pull Net Weight from Item master and fetch into Net Weight field of Quotation will be:
where test_net_weight is the target fieldname I had in the item table. Put this code in the custom script of the main form where you want to pull the net weight and not the item form.
where test_net_weight is the target fieldname I had in the item table. Put this code in the custom script of the main form where you want to pull the net weight and not the item form.
Thanks,
Anand.
On 16-May-2013, at 5:00 PM, HF <gm…@gmail.com> wrote:
Hi Umair;
It should display the value in the screen as soon as I choose the item isn’t it ?
It doen’t work ?
–
You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
Replace test_net_weight with the field in the Quotation Item. Then go to Tools (last icon on top bar) > Clear Cache & Refresh. This will make sure that the new custom script is included in the javascript code.
After this, it should work, provided that net weight value exists in the Item form for that Item.
where test_net_weight is the target fieldname I had in the item table. Put this code in the custom script of the main form where you want to pull the net weight and not the item form.
It works, sorry it was my fault I found that I have another script for the same doctype so I put this code with the old script and deleted the new script and it works.
Thanks.
–
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.