We get material from our customers for job work. So we prepare a stock entry which contains details of customer and the items sent. We have a custom script which triggers when we update the field service_material which is a link to “Stock Entry”. The script should update data of customer and items sent to us in quotation so that we may prepare a quotation document.
First half of the code upto the statement $.each…, is working fine but the items child table is not getting updated.
I found this strange behavior in V11 where custom script stopped working.
Fixed it via migrating environment to python3 again and resetting production environment.
Tried above steps, no change.
Still, master information is being shown but in child table ‘items’ only a blank record is added. Looks like the source records are not being read. Any suggestions would be really appreciated. Thanks.
Tried this but it did not work, same result. The master data is being added but no items get added. Can you check where i am going wrong. Thanks in advance.
I"ve recreated your scenario and the customer and company record does not get populated. In fact, only the custom fields do get populated. I’ve noticed that only the custom fields in the first row are retrieved…even though the item code does not and the item grid appears to be blank.
I’ll keep testing and will let you know if I have any success. Let me know as well if you do come right.
FYI- I had to remove the double quotes to get the script running this far
I have tested your script extensively and found the same result.
This is no doubt quite an alarming issue which only the frappe team can resolve.
I recall the same thing happening some years back with a big name ERP provider from Europe whose name I shalln’t divuldge. Even though they eventually did fix the issue eventually,the effect ever since has resulted in customers being extremely averse to upgrades.
The breaking of custom scripts between v10 and v11 is quite a serious issue that needs attention ASAP.
I can only hope someone from the frappe team will read this post and attend to the issue
Thanks for taking time to try it out for me. I don’t know if it has something to do with python version (i am on version 2.7) or custom script permissions to access or write child table data.
I will keep trying. Thanks again.
Ok this finally did the trick. Thanks to the developers who must have made it possible to still use custom scripts and to Eli for helping me out in every possible way. With V11.1.33 this script is working perfectly.