Automatic invoice After New doctype validation help me

Hello ;
I created a doctype (folder) contains customer name and 1 item and item serial number.
I want to create an automatic invoice after doctype (folder)validation.
I need help.
Thanks.