Create a child table from doctype list

Check out the last post in the thread, you’ll find the general code for this, modify it to suit your case: