What is the best way to extend the Stock Entry Doctype?

What we are trying to achieve is a simpler stock entry form that infers most of the inputs from as few as 3 inputs e.g A Production Complete Form where the only input is production date and warehouse, from those two we are able to calculate which Raw materials were in the Warehouse and How much of it was available and then perform a Repack into the Final product.

We are willing to edit the code, so far I have tried 2 approaches, a doctype which inherits stock entry doctype and generates the inputs insider the constructor (before calling super) and a doctype that does not inherit stockentry but instead creates a stockentry in background. so far I have not managed to get this working well but I can if it is confirmed am on the right track.

@cymox1 checkout @anand 's Quick Entry for Journal Entry erpnext/journal_entry.js at develop · frappe/erpnext · GitHub

You can build something on those lines.

Do send a pull-request if you build it.