We want to make a quotation from a stock entry. The transaction is such that we receive material from our customer on which we do some jobwork for which we send them a quotation.
First we prepare a material receipt with Customer Name, Items description etc.
Now we prepare a quotation in which we have mentioned a custom field Service_material which is link to the Stock Entry. We have also made one custom button get_item_details to read data from the linked Stock entry record. I am able to read the Parent table without problem but I have no clue how to copy values from child table ie. Item table.
I am using following Code in the custom script of doctype Quotation:
Is there a way in Version 4 to populate child table using data from parent or other tables. I am stuck with this. I want to make it in custom script as it is version update compatible. Any custom changes in .py and .js files get removed on erp version update.
Thanks
Now i am migrating from V4 to V6 but iam still unable to transfer data from child records. Please check the script and please suggest changes. Here service_material is a variable which works as the link between Stock_entry and Quotation.
On running the script the child data is not copied only the parent data is copied. Also the quotation form becomes disabled and we need to exit the form without saving.
Thanks cpurbaugh,
your pointers have moved me forward, now the form is not disabled while entering so the script is fine but it is not able to fetch the child record data. Child record data like item_code etc remains blank only the party_gp_no gets transfered. Can you think of some more tweaks so that the values also get transferred.